| 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/file_path.h" | 8 #include "base/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" |
| 11 #include "chrome/browser/ui/toolbar/bookmark_sub_menu_model.h" | |
| 12 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
| 13 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
| 14 #include "ui/base/accelerators/accelerator.h" | 13 #include "ui/base/accelerators/accelerator.h" |
| 15 #include "ui/base/models/button_menu_item_model.h" | 14 #include "ui/base/models/button_menu_item_model.h" |
| 16 #include "ui/base/models/simple_menu_model.h" | 15 #include "ui/base/models/simple_menu_model.h" |
| 17 | 16 |
| 17 class BookmarkSubMenuModel; |
| 18 class Browser; | 18 class Browser; |
| 19 class RecentTabsSubMenuModel; |
| 19 class TabStripModel; | 20 class TabStripModel; |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| 22 class MockWrenchMenuModel; | 23 class MockWrenchMenuModel; |
| 23 } // namespace | 24 } // namespace |
| 24 | 25 |
| 25 // A menu model that builds the contents of an encoding menu. | 26 // A menu model that builds the contents of an encoding menu. |
| 26 class EncodingMenuModel : public ui::SimpleMenuModel, | 27 class EncodingMenuModel : public ui::SimpleMenuModel, |
| 27 public ui::SimpleMenuModel::Delegate { | 28 public ui::SimpleMenuModel::Delegate { |
| 28 public: | 29 public: |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 155 |
| 155 // Label of the zoom label in the zoom menu item. | 156 // Label of the zoom label in the zoom menu item. |
| 156 string16 zoom_label_; | 157 string16 zoom_label_; |
| 157 | 158 |
| 158 // Tools menu. | 159 // Tools menu. |
| 159 scoped_ptr<ToolsMenuModel> tools_menu_model_; | 160 scoped_ptr<ToolsMenuModel> tools_menu_model_; |
| 160 | 161 |
| 161 // Bookmark submenu. | 162 // Bookmark submenu. |
| 162 scoped_ptr<BookmarkSubMenuModel> bookmark_sub_menu_model_; | 163 scoped_ptr<BookmarkSubMenuModel> bookmark_sub_menu_model_; |
| 163 | 164 |
| 165 // Recent Tabs submenu. |
| 166 scoped_ptr<RecentTabsSubMenuModel> recent_tabs_sub_menu_model_; |
| 167 |
| 164 ui::AcceleratorProvider* provider_; // weak | 168 ui::AcceleratorProvider* provider_; // weak |
| 165 | 169 |
| 166 Browser* browser_; // weak | 170 Browser* browser_; // weak |
| 167 TabStripModel* tab_strip_model_; // weak | 171 TabStripModel* tab_strip_model_; // weak |
| 168 | 172 |
| 169 content::NotificationRegistrar registrar_; | 173 content::NotificationRegistrar registrar_; |
| 170 | 174 |
| 171 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); | 175 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); |
| 172 }; | 176 }; |
| 173 | 177 |
| 174 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ | 178 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ |
| OLD | NEW |