| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_GTK_EXTENSION_SHELF_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_EXTENSION_SHELF_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_EXTENSION_SHELF_GTK_H_ | 6 #define CHROME_BROWSER_GTK_EXTENSION_SHELF_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // default behaviour). | 35 // default behaviour). |
| 36 void Show(); | 36 void Show(); |
| 37 void Hide(); | 37 void Hide(); |
| 38 | 38 |
| 39 // ExtensionShelfModelObserver | 39 // ExtensionShelfModelObserver |
| 40 virtual void ToolstripInsertedAt(ExtensionHost* host, int index); | 40 virtual void ToolstripInsertedAt(ExtensionHost* host, int index); |
| 41 virtual void ToolstripRemovingAt(ExtensionHost* host, int index); | 41 virtual void ToolstripRemovingAt(ExtensionHost* host, int index); |
| 42 virtual void ToolstripMoved(ExtensionHost* host, | 42 virtual void ToolstripMoved(ExtensionHost* host, |
| 43 int from_index, | 43 int from_index, |
| 44 int to_index); | 44 int to_index); |
| 45 virtual void ToolstripChangedAt(ExtensionHost* host, int index); | 45 virtual void ToolstripChanged(ExtensionShelfModel::iterator toolstrip); |
| 46 virtual void ExtensionShelfEmpty(); | 46 virtual void ExtensionShelfEmpty(); |
| 47 virtual void ShelfModelReloaded(); | 47 virtual void ShelfModelReloaded(); |
| 48 virtual void ShelfModelDeleting(); |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 class Toolstrip; | 51 class Toolstrip; |
| 51 | 52 |
| 52 // Create the contents of the extension shelf. | 53 // Create the contents of the extension shelf. |
| 53 void Init(Profile* profile); | 54 void Init(Profile* profile); |
| 54 | 55 |
| 55 // Overridden from NotificationObserver: | 56 // Overridden from NotificationObserver: |
| 56 virtual void Observe(NotificationType type, | 57 virtual void Observe(NotificationType type, |
| 57 const NotificationSource& source, | 58 const NotificationSource& source, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 81 GtkWidget* shelf_hbox_; | 82 GtkWidget* shelf_hbox_; |
| 82 | 83 |
| 83 GtkThemeProvider* theme_provider_; | 84 GtkThemeProvider* theme_provider_; |
| 84 | 85 |
| 85 // Paints the background for our bookmark bar. | 86 // Paints the background for our bookmark bar. |
| 86 scoped_ptr<NineBox> background_ninebox_; | 87 scoped_ptr<NineBox> background_ninebox_; |
| 87 | 88 |
| 88 NotificationRegistrar registrar_; | 89 NotificationRegistrar registrar_; |
| 89 | 90 |
| 90 // The model representing the toolstrips on the shelf. | 91 // The model representing the toolstrips on the shelf. |
| 91 scoped_ptr<ExtensionShelfModel> model_; | 92 ExtensionShelfModel* model_; |
| 92 | 93 |
| 93 // Set of toolstrip views which are really on the shelf. | 94 // Set of toolstrip views which are really on the shelf. |
| 94 std::set<Toolstrip*> toolstrips_; | 95 std::set<Toolstrip*> toolstrips_; |
| 95 | 96 |
| 96 DISALLOW_COPY_AND_ASSIGN(ExtensionShelfGtk); | 97 DISALLOW_COPY_AND_ASSIGN(ExtensionShelfGtk); |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 #endif // CHROME_BROWSER_EXTENSION_SHELF_GTK_H_ | 100 #endif // CHROME_BROWSER_EXTENSION_SHELF_GTK_H_ |
| OLD | NEW |