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

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

Issue 2469013003: Keep the toolbar overflow menu the same when removing a component action (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/toolbar_actions_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 void AddItem(const ToolbarItem& item); 266 void AddItem(const ToolbarItem& item);
267 267
268 // Removes |item| from the toolbar. If the toolbar is in highlighting mode, 268 // Removes |item| from the toolbar. If the toolbar is in highlighting mode,
269 // the item is also removed from the highlighted list (if present). 269 // the item is also removed from the highlighted list (if present).
270 void RemoveItem(const ToolbarItem& item); 270 void RemoveItem(const ToolbarItem& item);
271 271
272 // Looks up and returns the extension with the given |id| in the set of 272 // Looks up and returns the extension with the given |id| in the set of
273 // enabled extensions. 273 // enabled extensions.
274 const extensions::Extension* GetExtensionById(const std::string& id) const; 274 const extensions::Extension* GetExtensionById(const std::string& id) const;
275 275
276 // Returns true if the action is visible on the toolbar.
277 bool IsActionVisible(const std::string& action_id) const;
278
276 // Our observers. 279 // Our observers.
277 base::ObserverList<Observer> observers_; 280 base::ObserverList<Observer> observers_;
278 281
279 // The Profile this toolbar model is for. 282 // The Profile this toolbar model is for.
280 Profile* profile_; 283 Profile* profile_;
281 284
282 extensions::ExtensionPrefs* extension_prefs_; 285 extensions::ExtensionPrefs* extension_prefs_;
283 PrefService* prefs_; 286 PrefService* prefs_;
284 287
285 // The ExtensionActionAPI object, cached for convenience. 288 // The ExtensionActionAPI object, cached for convenience.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // For observing change of toolbar order preference by external entity (sync). 341 // For observing change of toolbar order preference by external entity (sync).
339 PrefChangeRegistrar pref_change_registrar_; 342 PrefChangeRegistrar pref_change_registrar_;
340 base::Closure pref_change_callback_; 343 base::Closure pref_change_callback_;
341 344
342 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; 345 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_;
343 346
344 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); 347 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel);
345 }; 348 };
346 349
347 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ 350 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/toolbar/toolbar_actions_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698