| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |