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

Unified Diff: chrome/browser/gtk/extension_shelf_gtk.h

Issue 155957: Populate the Linux extension shelf with placeholder labels containing each extension's name. (Closed)
Patch Set: Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/extension_shelf_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/extension_shelf_gtk.h
diff --git a/chrome/browser/gtk/extension_shelf_gtk.h b/chrome/browser/gtk/extension_shelf_gtk.h
index 849bc90fa239c6d12b18630db3a4442639ab1060..da2948ddceea5750923013ad1e2ee2635f0c3121 100644
--- a/chrome/browser/gtk/extension_shelf_gtk.h
+++ b/chrome/browser/gtk/extension_shelf_gtk.h
@@ -7,6 +7,8 @@
#include <gtk/gtk.h>
+#include <set>
+
#include "base/scoped_ptr.h"
#include "chrome/browser/extensions/extension_shelf_model.h"
#include "chrome/common/notification_observer.h"
@@ -35,16 +37,18 @@ class ExtensionShelfGtk : public ExtensionShelfModelObserver,
void Hide();
// ExtensionShelfModelObserver
- virtual void ToolstripInsertedAt(ExtensionHost* toolstrip, int index);
- virtual void ToolstripRemovingAt(ExtensionHost* toolstrip, int index);
- virtual void ToolstripMoved(ExtensionHost* toolstrip,
+ virtual void ToolstripInsertedAt(ExtensionHost* host, int index);
+ virtual void ToolstripRemovingAt(ExtensionHost* host, int index);
+ virtual void ToolstripMoved(ExtensionHost* host,
int from_index,
int to_index);
- virtual void ToolstripChangedAt(ExtensionHost* toolstrip, int index);
+ virtual void ToolstripChangedAt(ExtensionHost* host, int index);
virtual void ExtensionShelfEmpty();
virtual void ShelfModelReloaded();
private:
+ class Toolstrip;
+
// Create the contents of the extension shelf.
void Init(Profile* profile);
@@ -59,6 +63,10 @@ class ExtensionShelfGtk : public ExtensionShelfModelObserver,
// Determines what is our target height and sets it.
void AdjustHeight();
+ void LoadFromModel();
+
+ Toolstrip* ToolstripAtIndex(int index);
+
// GtkHBox callbacks.
static gboolean OnHBoxExpose(GtkWidget* widget, GdkEventExpose* event,
ExtensionShelfGtk* window);
@@ -72,10 +80,6 @@ class ExtensionShelfGtk : public ExtensionShelfModelObserver,
// Used to position all children.
GtkWidget* shelf_hbox_;
- // Label for placeholder text.
- // TODO(phajdan.jr): Remove the placeholder label when we have real contents.
- GtkWidget* label_;
-
GtkThemeProvider* theme_provider_;
// Paints the background for our bookmark bar.
@@ -85,6 +89,11 @@ class ExtensionShelfGtk : public ExtensionShelfModelObserver,
// The model representing the toolstrips on the shelf.
scoped_ptr<ExtensionShelfModel> model_;
+
+ // Set of toolstrip views which are really on the shelf.
+ std::set<Toolstrip*> toolstrips_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionShelfGtk);
};
#endif // CHROME_BROWSER_EXTENSION_SHELF_GTK_H_
« no previous file with comments | « no previous file | chrome/browser/gtk/extension_shelf_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698