| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 const Extension* GetExtensionByIndex(int index) const; | 68 const Extension* GetExtensionByIndex(int index) const; |
| 69 | 69 |
| 70 // Utility functions for converting between an index into the list of | 70 // Utility functions for converting between an index into the list of |
| 71 // incognito-enabled browser actions, and the list of all browser actions. | 71 // incognito-enabled browser actions, and the list of all browser actions. |
| 72 int IncognitoIndexToOriginal(int incognito_index); | 72 int IncognitoIndexToOriginal(int incognito_index); |
| 73 int OriginalIndexToIncognito(int original_index); | 73 int OriginalIndexToIncognito(int original_index); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 // NotificationObserver implementation. | 76 // NotificationObserver implementation. |
| 77 virtual void Observe(NotificationType type, | 77 virtual void Observe(int type, |
| 78 const NotificationSource& source, | 78 const NotificationSource& source, |
| 79 const NotificationDetails& details); | 79 const NotificationDetails& details); |
| 80 | 80 |
| 81 // To be called after the extension service is ready; gets loaded extensions | 81 // To be called after the extension service is ready; gets loaded extensions |
| 82 // from the extension service and their saved order from the pref service | 82 // from the extension service and their saved order from the pref service |
| 83 // and constructs |toolitems_| from these data. | 83 // and constructs |toolitems_| from these data. |
| 84 void InitializeExtensionList(); | 84 void InitializeExtensionList(); |
| 85 | 85 |
| 86 // Save the model to prefs. | 86 // Save the model to prefs. |
| 87 void UpdatePrefs(); | 87 void UpdatePrefs(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 110 size_t last_extension_removed_index_; | 110 size_t last_extension_removed_index_; |
| 111 | 111 |
| 112 // The number of icons visible (the rest should be hidden in the overflow | 112 // The number of icons visible (the rest should be hidden in the overflow |
| 113 // chevron). | 113 // chevron). |
| 114 int visible_icon_count_; | 114 int visible_icon_count_; |
| 115 | 115 |
| 116 NotificationRegistrar registrar_; | 116 NotificationRegistrar registrar_; |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ | 119 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ |
| OLD | NEW |