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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BAR_INSTRUCTIONS_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BAR_INSTRUCTIONS_GTK_H_ 7 8 #include "base/basictypes.h" 9 #include "base/compiler_specific.h" 10 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_registrar.h" 12 #include "ui/base/gtk/gtk_signal.h" 13 14 typedef struct _GtkWidget GtkWidget; 15 class GtkThemeService; 16 class Profile; 17 18 namespace chrome { 19 class BookmarkBarInstructionsDelegate; 20 } 21 22 class BookmarkBarInstructionsGtk : public content::NotificationObserver { 23 public: 24 BookmarkBarInstructionsGtk(chrome::BookmarkBarInstructionsDelegate* delegate, 25 Profile* profile); 26 27 // Get the native widget. 28 GtkWidget* widget() const { return instructions_hbox_; } 29 30 private: 31 // Overridden from content::NotificationObserver: 32 virtual void Observe(int type, 33 const content::NotificationSource& source, 34 const content::NotificationDetails& details) OVERRIDE; 35 36 CHROMEGTK_CALLBACK_0(BookmarkBarInstructionsGtk, void, OnButtonClick); 37 38 // Sets the correct color for |instructions_label_| and |instructions_link_|. 39 void UpdateColors(); 40 41 chrome::BookmarkBarInstructionsDelegate* delegate_; 42 43 Profile* profile_; 44 45 GtkThemeService* theme_service_; 46 47 // HBox that holds the the label and link of bookmark bar import promotion. 48 GtkWidget* instructions_hbox_; 49 GtkWidget* instructions_label_; 50 GtkWidget* instructions_link_; 51 52 content::NotificationRegistrar registrar_; 53 54 DISALLOW_COPY_AND_ASSIGN(BookmarkBarInstructionsGtk); 55 }; 56 57 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_BAR_INSTRUCTIONS_GTK_H_ 58