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

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

Issue 2906723003: [Extenisons UI] Remove extension_action_redesign logic from the toolbar (Closed)
Patch Set: comments Created 3 years, 6 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_TOOLBAR_ACTIONS_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 extensions::UnloadedExtensionReason reason) override; 218 extensions::UnloadedExtensionReason reason) override;
219 void OnExtensionUninstalled(content::BrowserContext* browser_context, 219 void OnExtensionUninstalled(content::BrowserContext* browser_context,
220 const extensions::Extension* extension, 220 const extensions::Extension* extension,
221 extensions::UninstallReason reason) override; 221 extensions::UninstallReason reason) override;
222 222
223 // ExtensionActionAPI::Observer: 223 // ExtensionActionAPI::Observer:
224 void OnExtensionActionUpdated( 224 void OnExtensionActionUpdated(
225 ExtensionAction* extension_action, 225 ExtensionAction* extension_action,
226 content::WebContents* web_contents, 226 content::WebContents* web_contents,
227 content::BrowserContext* browser_context) override; 227 content::BrowserContext* browser_context) override;
228 void OnExtensionActionVisibilityChanged(const std::string& extension_id,
229 bool is_now_visible) override;
230 228
231 // To be called after the extension service is ready; gets loaded extensions 229 // To be called after the extension service is ready; gets loaded extensions
232 // from the ExtensionRegistry, their saved order from the pref service, and 230 // from the ExtensionRegistry, their saved order from the pref service, and
233 // the initial set of component actions from the 231 // the initial set of component actions from the
234 // ComponentToolbarActionsFactory, and constructs |toolbar_items_| from these 232 // ComponentToolbarActionsFactory, and constructs |toolbar_items_| from these
235 // data. IncognitoPopulate() takes the shortcut - looking at the regular 233 // data. IncognitoPopulate() takes the shortcut - looking at the regular
236 // model's content and modifying it. 234 // model's content and modifying it.
237 void InitializeActionList(); 235 void InitializeActionList();
238 void Populate(); 236 void Populate();
239 void IncognitoPopulate(); 237 void IncognitoPopulate();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 extensions::ExtensionRegistry* extension_registry_; 290 extensions::ExtensionRegistry* extension_registry_;
293 291
294 // The ExtensionActionManager, cached for convenience. 292 // The ExtensionActionManager, cached for convenience.
295 extensions::ExtensionActionManager* extension_action_manager_; 293 extensions::ExtensionActionManager* extension_action_manager_;
296 294
297 std::unique_ptr<ComponentToolbarActionsFactory> component_actions_factory_; 295 std::unique_ptr<ComponentToolbarActionsFactory> component_actions_factory_;
298 296
299 // True if we've handled the initial EXTENSIONS_READY notification. 297 // True if we've handled the initial EXTENSIONS_READY notification.
300 bool actions_initialized_; 298 bool actions_initialized_;
301 299
302 // If true, we include all actions in the toolbar model.
303 bool use_redesign_;
304
305 // Ordered list of browser actions. 300 // Ordered list of browser actions.
306 std::vector<ToolbarItem> toolbar_items_; 301 std::vector<ToolbarItem> toolbar_items_;
307 302
308 // List of browser actions which should be highlighted. 303 // List of browser actions which should be highlighted.
309 std::vector<ToolbarItem> highlighted_items_; 304 std::vector<ToolbarItem> highlighted_items_;
310 305
311 // The current type of highlight (with HIGHLIGHT_NONE indicating no current 306 // The current type of highlight (with HIGHLIGHT_NONE indicating no current
312 // highlight). 307 // highlight).
313 HighlightType highlight_type_; 308 HighlightType highlight_type_;
314 309
(...skipping 24 matching lines...) Expand all
339 // For observing change of toolbar order preference by external entity (sync). 334 // For observing change of toolbar order preference by external entity (sync).
340 PrefChangeRegistrar pref_change_registrar_; 335 PrefChangeRegistrar pref_change_registrar_;
341 base::Closure pref_change_callback_; 336 base::Closure pref_change_callback_;
342 337
343 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; 338 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_;
344 339
345 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); 340 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel);
346 }; 341 };
347 342
348 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ 343 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.cc ('k') | chrome/browser/ui/toolbar/toolbar_actions_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698