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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_menu_model.h

Issue 10827146: crbug.com/127841 - Request Tablet Site on CB with touch screen. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: impl. review comments Created 8 years, 4 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
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_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" 11 #include "chrome/browser/ui/toolbar/bookmark_sub_menu_model.h"
12 #include "content/public/browser/notification_observer.h" 12 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 13 #include "content/public/browser/notification_registrar.h"
14 #include "ui/base/accelerators/accelerator.h" 14 #include "ui/base/accelerators/accelerator.h"
15 #include "ui/base/models/button_menu_item_model.h" 15 #include "ui/base/models/button_menu_item_model.h"
16 #include "ui/base/models/simple_menu_model.h" 16 #include "ui/base/models/simple_menu_model.h"
17 17
18 class Browser; 18 class Browser;
19 class TabStripModel; 19 class TabStripModel;
20 20 namespace content {
21 class NavigationEntry;
22 }
21 namespace { 23 namespace {
22 class MockWrenchMenuModel; 24 class MockWrenchMenuModel;
23 } // namespace 25 } // namespace
24 26
25 // A menu model that builds the contents of an encoding menu. 27 // A menu model that builds the contents of an encoding menu.
26 class EncodingMenuModel : public ui::SimpleMenuModel, 28 class EncodingMenuModel : public ui::SimpleMenuModel,
27 public ui::SimpleMenuModel::Delegate { 29 public ui::SimpleMenuModel::Delegate {
28 public: 30 public:
29 explicit EncodingMenuModel(Browser* browser); 31 explicit EncodingMenuModel(Browser* browser);
30 virtual ~EncodingMenuModel(); 32 virtual ~EncodingMenuModel();
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Appends everything needed for the clipboard menu: a menu break, the 136 // Appends everything needed for the clipboard menu: a menu break, the
135 // clipboard menu content and the finalizing menu break. If the last break 137 // clipboard menu content and the finalizing menu break. If the last break
136 // is not needed it can be suppressed by setting |append_final_separator| 138 // is not needed it can be suppressed by setting |append_final_separator|
137 // to false. 139 // to false.
138 void CreateCutCopyPasteMenu(bool append_final_separator); 140 void CreateCutCopyPasteMenu(bool append_final_separator);
139 141
140 // Appends everything needed for the zoom menu: a menu break, then the zoom 142 // Appends everything needed for the zoom menu: a menu break, then the zoom
141 // menu content and then another menu break. 143 // menu content and then another menu break.
142 void CreateZoomMenu(); 144 void CreateZoomMenu();
143 145
146 content::NavigationEntry* GetActiveNavigationEntry() const;
gone 2012/08/03 21:53:06 Add comment describing what this function does.
sschmitz 2012/08/03 23:25:26 Done.
147
144 string16 GetSyncMenuLabel() const; 148 string16 GetSyncMenuLabel() const;
145 149
146 // Models for the special menu items with buttons. 150 // Models for the special menu items with buttons.
147 scoped_ptr<ui::ButtonMenuItemModel> edit_menu_item_model_; 151 scoped_ptr<ui::ButtonMenuItemModel> edit_menu_item_model_;
148 scoped_ptr<ui::ButtonMenuItemModel> zoom_menu_item_model_; 152 scoped_ptr<ui::ButtonMenuItemModel> zoom_menu_item_model_;
149 153
150 // Label of the zoom label in the zoom menu item. 154 // Label of the zoom label in the zoom menu item.
151 string16 zoom_label_; 155 string16 zoom_label_;
152 156
153 // Tools menu. 157 // Tools menu.
154 scoped_ptr<ToolsMenuModel> tools_menu_model_; 158 scoped_ptr<ToolsMenuModel> tools_menu_model_;
155 159
156 // Bookmark submenu. 160 // Bookmark submenu.
157 scoped_ptr<BookmarkSubMenuModel> bookmark_sub_menu_model_; 161 scoped_ptr<BookmarkSubMenuModel> bookmark_sub_menu_model_;
158 162
159 ui::AcceleratorProvider* provider_; // weak 163 ui::AcceleratorProvider* provider_; // weak
160 164
161 Browser* browser_; // weak 165 Browser* browser_; // weak
162 TabStripModel* tab_strip_model_; // weak 166 TabStripModel* tab_strip_model_; // weak
163 167
164 content::NotificationRegistrar registrar_; 168 content::NotificationRegistrar registrar_;
165 169
166 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); 170 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel);
167 }; 171 };
168 172
169 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ 173 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698