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

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

Issue 2260343002: Revert of Show the Cast toolbar icon ephemerally when Cast is in use (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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_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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 bool ShouldAddExtension(const extensions::Extension* extension); 251 bool ShouldAddExtension(const extensions::Extension* extension);
252 252
253 // Adds or removes the given |extension| from the toolbar model. 253 // Adds or removes the given |extension| from the toolbar model.
254 void AddExtension(const extensions::Extension* extension); 254 void AddExtension(const extensions::Extension* extension);
255 void RemoveExtension(const extensions::Extension* extension); 255 void RemoveExtension(const extensions::Extension* extension);
256 256
257 // Returns true if |item| is in the toolbar model. 257 // Returns true if |item| is in the toolbar model.
258 bool HasItem(const ToolbarItem& item) const; 258 bool HasItem(const ToolbarItem& item) const;
259 259
260 // Adds |item| to the toolbar. If the item has an existing preference for 260 // Adds |item| to the toolbar. If the item has an existing preference for
261 // toolbar position, that will be used to determine its location. Otherwise 261 // toolbar position, that will be used to determine its location. If
262 // it will be placed at the end of the visible items. If the toolbar is in 262 // |is_component| is true, the item will be given a default postion of 0,
263 // highlighting mode, the item will not be visible until highlighting mode is 263 // otherwise the default is at the end of the visible items. If the toolbar is
264 // exited. 264 // in highlighting mode, the item will not be visible until highlighting mode
265 void AddItem(const ToolbarItem& item); 265 // is exited.
266 void AddItem(const ToolbarItem& item, bool is_component);
266 267
267 // 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,
268 // the item is also removed from the highlighted list (if present). 269 // the item is also removed from the highlighted list (if present).
269 void RemoveItem(const ToolbarItem& item); 270 void RemoveItem(const ToolbarItem& item);
270 271
271 // 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
272 // enabled extensions. 273 // enabled extensions.
273 const extensions::Extension* GetExtensionById(const std::string& id) const; 274 const extensions::Extension* GetExtensionById(const std::string& id) const;
274 275
275 // Our observers. 276 // Our observers.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // For observing change of toolbar order preference by external entity (sync). 338 // For observing change of toolbar order preference by external entity (sync).
338 PrefChangeRegistrar pref_change_registrar_; 339 PrefChangeRegistrar pref_change_registrar_;
339 base::Closure pref_change_callback_; 340 base::Closure pref_change_callback_;
340 341
341 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_; 342 base::WeakPtrFactory<ToolbarActionsModel> weak_ptr_factory_;
342 343
343 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel); 344 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsModel);
344 }; 345 };
345 346
346 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_ 347 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/media_router_contextual_menu.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