| OLD | NEW |
| 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_TOOLBAR_WRENCH_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 void CreateCutCopyPasteMenu(bool new_menu); | 153 void CreateCutCopyPasteMenu(bool new_menu); |
| 154 | 154 |
| 155 // Appends everything needed for the zoom menu: a menu break, then the zoom | 155 // Appends everything needed for the zoom menu: a menu break, then the zoom |
| 156 // menu content and then another menu break. If the new menu type is used, | 156 // menu content and then another menu break. If the new menu type is used, |
| 157 // |new_menu| should be set to true. | 157 // |new_menu| should be set to true. |
| 158 void CreateZoomMenu(bool new_menu); | 158 void CreateZoomMenu(bool new_menu); |
| 159 | 159 |
| 160 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | 160 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); |
| 161 | 161 |
| 162 bool ShouldShowNewIncognitoWindowMenuItem(); | 162 bool ShouldShowNewIncognitoWindowMenuItem(); |
| 163 bool ShouldShowNewWindowMenuItem(); | |
| 164 | 163 |
| 165 // Models for the special menu items with buttons. | 164 // Models for the special menu items with buttons. |
| 166 scoped_ptr<ui::ButtonMenuItemModel> edit_menu_item_model_; | 165 scoped_ptr<ui::ButtonMenuItemModel> edit_menu_item_model_; |
| 167 scoped_ptr<ui::ButtonMenuItemModel> zoom_menu_item_model_; | 166 scoped_ptr<ui::ButtonMenuItemModel> zoom_menu_item_model_; |
| 168 | 167 |
| 169 // Label of the zoom label in the zoom menu item. | 168 // Label of the zoom label in the zoom menu item. |
| 170 base::string16 zoom_label_; | 169 base::string16 zoom_label_; |
| 171 | 170 |
| 172 // Tools menu. | 171 // Tools menu. |
| 173 scoped_ptr<ToolsMenuModel> tools_menu_model_; | 172 scoped_ptr<ToolsMenuModel> tools_menu_model_; |
| 174 | 173 |
| 175 // Bookmark submenu. | 174 // Bookmark submenu. |
| 176 scoped_ptr<BookmarkSubMenuModel> bookmark_sub_menu_model_; | 175 scoped_ptr<BookmarkSubMenuModel> bookmark_sub_menu_model_; |
| 177 | 176 |
| 178 // Recent Tabs submenu. | 177 // Recent Tabs submenu. |
| 179 scoped_ptr<RecentTabsSubMenuModel> recent_tabs_sub_menu_model_; | 178 scoped_ptr<RecentTabsSubMenuModel> recent_tabs_sub_menu_model_; |
| 180 | 179 |
| 181 ui::AcceleratorProvider* provider_; // weak | 180 ui::AcceleratorProvider* provider_; // weak |
| 182 | 181 |
| 183 Browser* browser_; // weak | 182 Browser* browser_; // weak |
| 184 TabStripModel* tab_strip_model_; // weak | 183 TabStripModel* tab_strip_model_; // weak |
| 185 | 184 |
| 186 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; | 185 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; |
| 187 content::NotificationRegistrar registrar_; | 186 content::NotificationRegistrar registrar_; |
| 188 | 187 |
| 189 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); | 188 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); |
| 190 }; | 189 }; |
| 191 | 190 |
| 192 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ | 191 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| OLD | NEW |