Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.h

Issue 1654223002: Views - init less stuff in tabless browsers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/toolbar_view.h
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.h b/chrome/browser/ui/views/toolbar/toolbar_view.h
index 2c54a9dfe289bb31d91dc9be6ebbeeab28e7aa5e..d41a4465d6eece28fd0a12c0af5d22dd3781deed 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -40,7 +40,6 @@ class ToolbarView : public views::AccessiblePaneView,
public content::NotificationObserver,
public CommandObserver,
public views::ButtonListener,
- public views::WidgetObserver,
public views::ViewTargeterDelegate,
public AppMenuBadgeController::Delegate {
public:
@@ -86,10 +85,6 @@ class ToolbarView : public views::AccessiblePaneView,
void OnBubbleCreatedForAnchor(views::View* anchor_view,
views::Widget* bubble_widget);
- // Executes |command| registered by |extension|.
- void ExecuteExtensionCommand(const extensions::Extension* extension,
- const extensions::Command& command);
-
// Returns the maximum width the browser actions container can have.
int GetMaxBrowserActionsWidth() const;
@@ -135,9 +130,6 @@ class ToolbarView : public views::AccessiblePaneView,
// views::ButtonListener:
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
- // views::WidgetObserver:
- void OnWidgetActivationChanged(views::Widget* widget, bool active) override;
-
// content::NotificationObserver:
void Observe(int type,
const content::NotificationSource& source,
@@ -207,7 +199,8 @@ class ToolbarView : public views::AccessiblePaneView,
int content_shadow_height() const;
- // Controls
+ // Controls. Most of these can be null, e.g. in popup windows. Only
+ // |location_bar_| is guaranteed to exist.
BackButton* back_;
ToolbarButton* forward_;
ReloadButton* reload_;
@@ -215,6 +208,7 @@ class ToolbarView : public views::AccessiblePaneView,
LocationBarView* location_bar_;
BrowserActionsContainer* browser_actions_;
AppMenuButton* app_menu_button_;
+
Browser* browser_;
AppMenuBadgeController badge_controller_;
@@ -223,7 +217,7 @@ class ToolbarView : public views::AccessiblePaneView,
BooleanPrefMember show_home_button_;
// The display mode used when laying out the toolbar.
- DisplayMode display_mode_;
+ const DisplayMode display_mode_;
content::NotificationRegistrar registrar_;
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698