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

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

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows sync integration test failure Created 7 years, 10 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_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 "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h" 12 #include "content/public/browser/notification_registrar.h"
13 #include "ui/base/accelerators/accelerator.h" 13 #include "ui/base/accelerators/accelerator.h"
14 #include "ui/base/models/button_menu_item_model.h" 14 #include "ui/base/models/button_menu_item_model.h"
15 #include "ui/base/models/simple_menu_model.h" 15 #include "ui/base/models/simple_menu_model.h"
16 16
17 class BookmarkSubMenuModel; 17 class BookmarkSubMenuModel;
18 class Browser; 18 class Browser;
19 class GlobalError;
20 class RecentTabsSubMenuModel; 19 class RecentTabsSubMenuModel;
21 class TabStripModel; 20 class TabStripModel;
22 21
23 namespace { 22 namespace {
24 class MockWrenchMenuModel; 23 class MockWrenchMenuModel;
25 } // namespace 24 } // namespace
26 25
27 // A menu model that builds the contents of an encoding menu. 26 // A menu model that builds the contents of an encoding menu.
28 class EncodingMenuModel : public ui::SimpleMenuModel, 27 class EncodingMenuModel : public ui::SimpleMenuModel,
29 public ui::SimpleMenuModel::Delegate { 28 public ui::SimpleMenuModel::Delegate {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // clipboard menu content and the finalizing menu break. If the last break 140 // clipboard menu content and the finalizing menu break. If the last break
142 // is not needed it can be suppressed by setting |new_menu| 141 // is not needed it can be suppressed by setting |new_menu|
143 // to false. 142 // to false.
144 void CreateCutCopyPasteMenu(bool new_menu); 143 void CreateCutCopyPasteMenu(bool new_menu);
145 144
146 // Appends everything needed for the zoom menu: a menu break, then the zoom 145 // Appends everything needed for the zoom menu: a menu break, then the zoom
147 // menu content and then another menu break. If the new menu type is used, 146 // menu content and then another menu break. If the new menu type is used,
148 // |new_menu| should be set to true. 147 // |new_menu| should be set to true.
149 void CreateZoomMenu(bool new_menu); 148 void CreateZoomMenu(bool new_menu);
150 149
151 // Various GlobalError objects share a single menu item. This helper routine
152 // returns the GlobalError object that is currently displaying a message in
153 // that item, otherwise returns NULL if we should display one of the default
154 // messages.
155 GlobalError* GetActiveSignedInServiceError() const;
156
157 // Models for the special menu items with buttons. 150 // Models for the special menu items with buttons.
158 scoped_ptr<ui::ButtonMenuItemModel> edit_menu_item_model_; 151 scoped_ptr<ui::ButtonMenuItemModel> edit_menu_item_model_;
159 scoped_ptr<ui::ButtonMenuItemModel> zoom_menu_item_model_; 152 scoped_ptr<ui::ButtonMenuItemModel> zoom_menu_item_model_;
160 153
161 // Label of the zoom label in the zoom menu item. 154 // Label of the zoom label in the zoom menu item.
162 string16 zoom_label_; 155 string16 zoom_label_;
163 156
164 // Tools menu. 157 // Tools menu.
165 scoped_ptr<ToolsMenuModel> tools_menu_model_; 158 scoped_ptr<ToolsMenuModel> tools_menu_model_;
166 159
167 // Bookmark submenu. 160 // Bookmark submenu.
168 scoped_ptr<BookmarkSubMenuModel> bookmark_sub_menu_model_; 161 scoped_ptr<BookmarkSubMenuModel> bookmark_sub_menu_model_;
169 162
170 // Recent Tabs submenu. 163 // Recent Tabs submenu.
171 scoped_ptr<RecentTabsSubMenuModel> recent_tabs_sub_menu_model_; 164 scoped_ptr<RecentTabsSubMenuModel> recent_tabs_sub_menu_model_;
172 165
173 ui::AcceleratorProvider* provider_; // weak 166 ui::AcceleratorProvider* provider_; // weak
174 167
175 Browser* browser_; // weak 168 Browser* browser_; // weak
176 TabStripModel* tab_strip_model_; // weak 169 TabStripModel* tab_strip_model_; // weak
177 170
178 content::NotificationRegistrar registrar_; 171 content::NotificationRegistrar registrar_;
179 172
180 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel); 173 DISALLOW_COPY_AND_ASSIGN(WrenchMenuModel);
181 }; 174 };
182 175
183 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_ 176 #endif // CHROME_BROWSER_UI_TOOLBAR_WRENCH_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper_unittest.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698