Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader Mode: remove UI button #3397

Merged
merged 1 commit into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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