| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_VIEWS_TOOLBAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 ToolbarStarToggle* star_button() const { return star_; } | 107 ToolbarStarToggle* star_button() const { return star_; } |
| 108 GoButton* go_button() const { return go_; } | 108 GoButton* go_button() const { return go_; } |
| 109 LocationBarView* location_bar() const { return location_bar_; } | 109 LocationBarView* location_bar() const { return location_bar_; } |
| 110 views::MenuButton* page_menu() const { return page_menu_; } | 110 views::MenuButton* page_menu() const { return page_menu_; } |
| 111 views::MenuButton* app_menu() const { return app_menu_; } | 111 views::MenuButton* app_menu() const { return app_menu_; } |
| 112 | 112 |
| 113 // Overridden from Menu::BaseControllerDelegate: | 113 // Overridden from Menu::BaseControllerDelegate: |
| 114 virtual bool GetAcceleratorInfo(int id, views::Accelerator* accel); | 114 virtual bool GetAcceleratorInfo(int id, views::Accelerator* accel); |
| 115 | 115 |
| 116 // Overridden from views::MenuDelegate: | 116 // Overridden from views::MenuDelegate: |
| 117 virtual void RunMenu(views::View* source, const gfx::Point& pt, | 117 virtual void RunMenu(views::View* source, const gfx::Point& pt); |
| 118 gfx::NativeView hwnd); | |
| 119 | 118 |
| 120 // Overridden from GetProfilesHelper::Delegate: | 119 // Overridden from GetProfilesHelper::Delegate: |
| 121 virtual void OnGetProfilesDone(const std::vector<std::wstring>& profiles); | 120 virtual void OnGetProfilesDone(const std::vector<std::wstring>& profiles); |
| 122 | 121 |
| 123 // Overridden from LocationBarView::Delegate: | 122 // Overridden from LocationBarView::Delegate: |
| 124 virtual TabContents* GetTabContents(); | 123 virtual TabContents* GetTabContents(); |
| 125 virtual void OnInputInProgress(bool in_progress); | 124 virtual void OnInputInProgress(bool in_progress); |
| 126 | 125 |
| 127 // Overridden from CommandUpdater::CommandObserver: | 126 // Overridden from CommandUpdater::CommandObserver: |
| 128 virtual void EnabledStateChangedForCommand(int id, bool enabled); | 127 virtual void EnabledStateChangedForCommand(int id, bool enabled); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 172 |
| 174 // Set up the various Views in the toolbar | 173 // Set up the various Views in the toolbar |
| 175 void CreateLeftSideControls(); | 174 void CreateLeftSideControls(); |
| 176 void CreateCenterStack(Profile* profile); | 175 void CreateCenterStack(Profile* profile); |
| 177 void CreateRightSideControls(Profile* profile); | 176 void CreateRightSideControls(Profile* profile); |
| 178 void LoadLeftSideControlsImages(); | 177 void LoadLeftSideControlsImages(); |
| 179 void LoadCenterStackImages(); | 178 void LoadCenterStackImages(); |
| 180 void LoadRightSideControlsImages(); | 179 void LoadRightSideControlsImages(); |
| 181 | 180 |
| 182 // Runs various menus. | 181 // Runs various menus. |
| 183 void RunPageMenu(const gfx::Point& pt, gfx::NativeView hwnd); | 182 void RunPageMenu(const gfx::Point& pt); |
| 184 void RunAppMenu(const gfx::Point& pt, gfx::NativeView hwnd); | 183 void RunAppMenu(const gfx::Point& pt); |
| 185 | 184 |
| 186 void CreatePageMenu(); | 185 void CreatePageMenu(); |
| 187 void CreateZoomMenuContents(); | 186 void CreateZoomMenuContents(); |
| 188 void CreateEncodingMenuContents(); | 187 void CreateEncodingMenuContents(); |
| 189 #if defined(OS_WIN) | 188 #if defined(OS_WIN) |
| 190 void CreateDevToolsMenuContents(); | 189 void CreateDevToolsMenuContents(); |
| 191 #endif | 190 #endif |
| 192 void CreateAppMenu(); | 191 void CreateAppMenu(); |
| 193 | 192 |
| 194 // Types of display mode this toolbar can have. | 193 // Types of display mode this toolbar can have. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 scoped_ptr<views::SimpleMenuModel> devtools_menu_contents_; | 247 scoped_ptr<views::SimpleMenuModel> devtools_menu_contents_; |
| 249 scoped_ptr<views::SimpleMenuModel> app_menu_contents_; | 248 scoped_ptr<views::SimpleMenuModel> app_menu_contents_; |
| 250 scoped_ptr<views::SimpleMenuModel> extension_menu_contents_; | 249 scoped_ptr<views::SimpleMenuModel> extension_menu_contents_; |
| 251 | 250 |
| 252 // TODO(beng): build these into MenuButton. | 251 // TODO(beng): build these into MenuButton. |
| 253 scoped_ptr<views::Menu2> page_menu_menu_; | 252 scoped_ptr<views::Menu2> page_menu_menu_; |
| 254 scoped_ptr<views::Menu2> app_menu_menu_; | 253 scoped_ptr<views::Menu2> app_menu_menu_; |
| 255 }; | 254 }; |
| 256 | 255 |
| 257 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ | 256 #endif // CHROME_BROWSER_VIEWS_TOOLBAR_VIEW_H_ |
| OLD | NEW |