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

Side by Side Diff: chrome/browser/ui/views/toolbar_view.h

Issue 10677009: Move command handling and updating off Browser and onto a helper object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "chrome/browser/command_updater.h" 14 #include "chrome/browser/command_observer.h"
15 #include "chrome/browser/prefs/pref_member.h" 15 #include "chrome/browser/prefs/pref_member.h"
16 #include "chrome/browser/ui/search/search_model_observer.h" 16 #include "chrome/browser/ui/search/search_model_observer.h"
17 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" 17 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
18 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 18 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
19 #include "chrome/browser/ui/views/reload_button.h" 19 #include "chrome/browser/ui/views/reload_button.h"
20 #include "ui/base/accelerators/accelerator.h" 20 #include "ui/base/accelerators/accelerator.h"
21 #include "ui/base/animation/slide_animation.h" 21 #include "ui/base/animation/slide_animation.h"
22 #include "ui/views/accessible_pane_view.h" 22 #include "ui/views/accessible_pane_view.h"
23 #include "ui/views/controls/button/menu_button.h" 23 #include "ui/views/controls/button/menu_button.h"
24 #include "ui/views/controls/button/menu_button_listener.h" 24 #include "ui/views/controls/button/menu_button_listener.h"
(...skipping 14 matching lines...) Expand all
39 class MenuListener; 39 class MenuListener;
40 } 40 }
41 41
42 // The Browser Window's toolbar. 42 // The Browser Window's toolbar.
43 class ToolbarView : public views::AccessiblePaneView, 43 class ToolbarView : public views::AccessiblePaneView,
44 public views::MenuButtonListener, 44 public views::MenuButtonListener,
45 public ui::AcceleratorProvider, 45 public ui::AcceleratorProvider,
46 public LocationBarView::Delegate, 46 public LocationBarView::Delegate,
47 public chrome::search::SearchModelObserver, 47 public chrome::search::SearchModelObserver,
48 public content::NotificationObserver, 48 public content::NotificationObserver,
49 public CommandUpdater::CommandObserver, 49 public CommandObserver,
50 public views::ButtonListener { 50 public views::ButtonListener {
51 public: 51 public:
52 // The view class name. 52 // The view class name.
53 static const char kViewClassName[]; 53 static const char kViewClassName[];
54 54
55 explicit ToolbarView(Browser* browser); 55 explicit ToolbarView(Browser* browser);
56 virtual ~ToolbarView(); 56 virtual ~ToolbarView();
57 57
58 // Create the contents of the Browser Toolbar. |location_bar_parent| is the 58 // Create the contents of the Browser Toolbar. |location_bar_parent| is the
59 // view the LocationBarContainer is added to. |popup_parent_view| is the 59 // view the LocationBarContainer is added to. |popup_parent_view| is the
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 GetContentSettingBubbleModelDelegate() OVERRIDE; 121 GetContentSettingBubbleModelDelegate() OVERRIDE;
122 virtual void ShowPageInfo(content::WebContents* web_contents, 122 virtual void ShowPageInfo(content::WebContents* web_contents,
123 const GURL& url, 123 const GURL& url,
124 const content::SSLStatus& ssl, 124 const content::SSLStatus& ssl,
125 bool show_history) OVERRIDE; 125 bool show_history) OVERRIDE;
126 virtual void OnInputInProgress(bool in_progress) OVERRIDE; 126 virtual void OnInputInProgress(bool in_progress) OVERRIDE;
127 127
128 // Overridden from chrome::search::SearchModelObserver: 128 // Overridden from chrome::search::SearchModelObserver:
129 virtual void ModeChanged(const chrome::search::Mode& mode) OVERRIDE; 129 virtual void ModeChanged(const chrome::search::Mode& mode) OVERRIDE;
130 130
131 // Overridden from CommandUpdater::CommandObserver: 131 // Overridden from CommandObserver:
132 virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE; 132 virtual void EnabledStateChangedForCommand(int id, bool enabled) OVERRIDE;
133 133
134 // Overridden from views::ButtonListener: 134 // Overridden from views::ButtonListener:
135 virtual void ButtonPressed(views::Button* sender, 135 virtual void ButtonPressed(views::Button* sender,
136 const views::Event& event) OVERRIDE; 136 const views::Event& event) OVERRIDE;
137 137
138 // Overridden from content::NotificationObserver: 138 // Overridden from content::NotificationObserver:
139 virtual void Observe(int type, 139 virtual void Observe(int type,
140 const content::NotificationSource& source, 140 const content::NotificationSource& source,
141 const content::NotificationDetails& details) OVERRIDE; 141 const content::NotificationDetails& details) OVERRIDE;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 // A list of listeners to call when the menu opens. 246 // A list of listeners to call when the menu opens.
247 ObserverList<views::MenuListener> menu_listeners_; 247 ObserverList<views::MenuListener> menu_listeners_;
248 248
249 content::NotificationRegistrar registrar_; 249 content::NotificationRegistrar registrar_;
250 250
251 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView); 251 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarView);
252 }; 252 };
253 253
254 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_ 254 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698