Skip to content

Commit

Permalink
Merge pull request #3397 from brave/reader-mode-remove-button
Browse files Browse the repository at this point in the history
Reader Mode: remove UI button
  • Loading branch information
bsclifton authored Sep 10, 2019
2 parents 9d22af0 + c7166c1 commit e867c3d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions browser/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ source_set("ui") {
"views/frame/brave_browser_view.h",
"views/importer/brave_import_lock_dialog_view.cc",
"views/importer/brave_import_lock_dialog_view.h",
"views/reader_mode/brave_reader_mode_icon_view.cc",
"views/reader_mode/brave_reader_mode_icon_view.h",
"views/rounded_separator.cc",
"views/rounded_separator.h",
"views/toolbar/bookmark_button.cc",
Expand Down
11 changes: 11 additions & 0 deletions browser/ui/views/reader_mode/brave_reader_mode_icon_view.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) 2019 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// you can obtain one at http://mozilla.org/MPL/2.0/.

#include "brave/browser/ui/views/reader_mode/brave_reader_mode_icon_view.h"

bool BraveReaderModeIconView::Update() {
SetVisible(false);
return false;
}
21 changes: 21 additions & 0 deletions browser/ui/views/reader_mode/brave_reader_mode_icon_view.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2019 The Brave Authors. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// you can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef BRAVE_BROWSER_UI_VIEWS_READER_MODE_BRAVE_READER_MODE_ICON_VIEW_H_
#define BRAVE_BROWSER_UI_VIEWS_READER_MODE_BRAVE_READER_MODE_ICON_VIEW_H_

#include "chrome/browser/ui/views/reader_mode/reader_mode_icon_view.h"


class BraveReaderModeIconView : public ReaderModeIconView {
public:
using ReaderModeIconView::ReaderModeIconView;
protected:
bool Update() override;

DISALLOW_COPY_AND_ASSIGN(BraveReaderModeIconView);
};

#endif // BRAVE_BROWSER_UI_VIEWS_READER_MODE_BRAVE_READER_MODE_ICON_VIEW_H_
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "brave/browser/ui/views/translate/brave_translate_icon_view.h"
#include "brave/browser/ui/views/reader_mode/brave_reader_mode_icon_view.h"

#include "brave/browser/translate/buildflags/buildflags.h"

#if BUILDFLAG(ENABLE_BRAVE_TRANSLATE_EXTENSION)
#define TranslateIconView BraveTranslateIconView
#endif
#define ReaderModeIconView BraveReaderModeIconView
#include "../../../../../../../chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.cc"
#if BUILDFLAG(ENABLE_BRAVE_TRANSLATE_EXTENSION)
#undef TranslateIconView
#endif
#undef ReaderModeIconView

0 comments on commit e867c3d

Please sign in to comment.