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

Side by Side Diff: chrome/browser/extensions/extension_toolbar_model.h

Issue 661493004: Add infrastructure for Chrome Actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 }; 86 };
87 87
88 // Convenience function to get the ExtensionToolbarModel for a Profile. 88 // Convenience function to get the ExtensionToolbarModel for a Profile.
89 static ExtensionToolbarModel* Get(Profile* profile); 89 static ExtensionToolbarModel* Get(Profile* profile);
90 90
91 // Add or remove an observer. 91 // Add or remove an observer.
92 void AddObserver(Observer* observer); 92 void AddObserver(Observer* observer);
93 void RemoveObserver(Observer* observer); 93 void RemoveObserver(Observer* observer);
94 94
95 // Moves the given |extension|'s icon to the given |index|. 95 // Moves the given |extension|'s icon to the given |index|.
96 void MoveExtensionIcon(const Extension* extension, size_t index); 96 void MoveExtensionIcon(const std::string& id, size_t index);
97 97
98 // Sets the number of extension icons that should be visible. 98 // Sets the number of extension icons that should be visible.
99 // If count == size(), this will set the visible icon count to -1, meaning 99 // If count == size(), this will set the visible icon count to -1, meaning
100 // "show all actions". 100 // "show all actions".
101 void SetVisibleIconCount(int count); 101 void SetVisibleIconCount(int count);
102 102
103 // As above, a return value of -1 represents "show all actions". 103 // As above, a return value of -1 represents "show all actions".
104 int GetVisibleIconCount() const { return visible_icon_count_; } 104 int GetVisibleIconCount() const { return visible_icon_count_; }
105 105
106 bool extensions_initialized() const { return extensions_initialized_; } 106 bool extensions_initialized() const { return extensions_initialized_; }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 base::Closure pref_change_callback_; 248 base::Closure pref_change_callback_;
249 249
250 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_; 250 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_;
251 251
252 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); 252 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel);
253 }; 253 };
254 254
255 } // namespace extensions 255 } // namespace extensions
256 256
257 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 257 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/browser_action_test_util.h ('k') | chrome/browser/extensions/extension_toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698