diff --git a/browser/ui/BUILD.gn b/browser/ui/BUILD.gn index 316576f8d33e..6f001fe65c92 100644 --- a/browser/ui/BUILD.gn +++ b/browser/ui/BUILD.gn @@ -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", diff --git a/browser/ui/views/reader_mode/brave_reader_mode_icon_view.cc b/browser/ui/views/reader_mode/brave_reader_mode_icon_view.cc new file mode 100644 index 000000000000..fa36ee1214cb --- /dev/null +++ b/browser/ui/views/reader_mode/brave_reader_mode_icon_view.cc @@ -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; +} diff --git a/browser/ui/views/reader_mode/brave_reader_mode_icon_view.h b/browser/ui/views/reader_mode/brave_reader_mode_icon_view.h new file mode 100644 index 000000000000..cebddb490d6f --- /dev/null +++ b/browser/ui/views/reader_mode/brave_reader_mode_icon_view.h @@ -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_ diff --git a/chromium_src/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.cc b/chromium_src/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.cc index 81dd049cba9c..320c4ca233d2 100644 --- a/chromium_src/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.cc +++ b/chromium_src/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.cc @@ -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