Skip to content

Commit

Permalink
speedreader: Point to speedreader in settings
Browse files Browse the repository at this point in the history
We have two options here: (1) Point to
brave://settings?search=speedreader, which will highlight the
Speedreader setting, or (2) or provide a pointer to
brave://settings/appearance. I went with the former because it makes the
setting a bit easier to identify. There isn't a way to link to a
specific setting.

Resolves brave/brave-browser#17216
  • Loading branch information
Kevin Kuehler authored and rillian committed Oct 29, 2021
1 parent f85d8ee commit a61a9ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion browser/ui/views/speedreader/speedreader_mode_bubble.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ constexpr int kBubbleWidth = 324; // width is 324 pixels

constexpr int kFontSizeSiteTitle = 14; // site title font size

constexpr char kSpeedreaderSettings[] = "brave://settings/?search=speedreader";

} // anonymous namespace

namespace speedreader {
Expand Down Expand Up @@ -175,7 +177,7 @@ void SpeedreaderModeBubble::OnButtonPressed(const ui::Event& event) {

void SpeedreaderModeBubble::OnLinkClicked(const ui::Event& event) {
tab_helper_->web_contents()->OpenURL(
content::OpenURLParams(GURL("chrome://settings"), content::Referrer(),
content::OpenURLParams(GURL(kSpeedreaderSettings), content::Referrer(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui::PAGE_TRANSITION_LINK, false));
}
Expand Down

0 comments on commit a61a9ca

Please sign in to comment.