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

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

Issue 1004063003: [Extensions] Add logic for when to show the toolbar redesign bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // the ToolbarModel to only display those extensions. 148 // the ToolbarModel to only display those extensions.
149 // Highlighting mode is only entered if there is at least one extension to 149 // Highlighting mode is only entered if there is at least one extension to
150 // be shown. 150 // be shown.
151 // Returns true if highlighting mode is entered, false otherwise. 151 // Returns true if highlighting mode is entered, false otherwise.
152 bool HighlightExtensions(const ExtensionIdList& extension_ids); 152 bool HighlightExtensions(const ExtensionIdList& extension_ids);
153 153
154 // Stop highlighting extensions. All extensions can be shown again, and the 154 // Stop highlighting extensions. All extensions can be shown again, and the
155 // number of visible icons will be reset to what it was before highlighting. 155 // number of visible icons will be reset to what it was before highlighting.
156 void StopHighlighting(); 156 void StopHighlighting();
157 157
158 // Returns true if the toolbar model is running with the redesign and is
159 // showing new icons as a result.
160 bool RedesignIsShowingNewIcons() const;
161
158 private: 162 private:
159 // content::NotificationObserver: 163 // content::NotificationObserver:
160 void Observe(int type, 164 void Observe(int type,
161 const content::NotificationSource& source, 165 const content::NotificationSource& source,
162 const content::NotificationDetails& details) override; 166 const content::NotificationDetails& details) override;
163 167
164 // Callback when extensions are ready. 168 // Callback when extensions are ready.
165 void OnReady(); 169 void OnReady();
166 170
167 // ExtensionRegistryObserver: 171 // ExtensionRegistryObserver:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 base::Closure pref_change_callback_; 269 base::Closure pref_change_callback_;
266 270
267 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_; 271 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_;
268 272
269 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); 273 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel);
270 }; 274 };
271 275
272 } // namespace extensions 276 } // namespace extensions
273 277
274 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 278 #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