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

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

Issue 469973005: Add tests for the BrowserActionsContainer in overflow mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter's Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_toolbar_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_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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // the ToolbarModel to only display those extensions. 137 // the ToolbarModel to only display those extensions.
138 // Highlighting mode is only entered if there is at least one extension to 138 // Highlighting mode is only entered if there is at least one extension to
139 // be shown. 139 // be shown.
140 // Returns true if highlighting mode is entered, false otherwise. 140 // Returns true if highlighting mode is entered, false otherwise.
141 bool HighlightExtensions(const ExtensionIdList& extension_ids); 141 bool HighlightExtensions(const ExtensionIdList& extension_ids);
142 142
143 // Stop highlighting extensions. All extensions can be shown again, and the 143 // Stop highlighting extensions. All extensions can be shown again, and the
144 // number of visible icons will be reset to what it was before highlighting. 144 // number of visible icons will be reset to what it was before highlighting.
145 void StopHighlighting(); 145 void StopHighlighting();
146 146
147 // Sets the number of visible icons and notifies all observers of the change.
148 void SetVisibleIconCountForTest(size_t visible_icons);
149
147 private: 150 private:
148 // content::NotificationObserver: 151 // content::NotificationObserver:
149 virtual void Observe(int type, 152 virtual void Observe(int type,
150 const content::NotificationSource& source, 153 const content::NotificationSource& source,
151 const content::NotificationDetails& details) OVERRIDE; 154 const content::NotificationDetails& details) OVERRIDE;
152 155
153 // Callback when extensions are ready. 156 // Callback when extensions are ready.
154 void OnReady(); 157 void OnReady();
155 158
156 // ExtensionRegistryObserver: 159 // ExtensionRegistryObserver:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 base::Closure pref_change_callback_; 253 base::Closure pref_change_callback_;
251 254
252 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_; 255 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_;
253 256
254 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); 257 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel);
255 }; 258 };
256 259
257 } // namespace extensions 260 } // namespace extensions
258 261
259 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 262 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698