Home | History | Annotate | Download | only in gtk
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_UI_GTK_OVERFLOW_BUTTON_H_
      6 #define CHROME_BROWSER_UI_GTK_OVERFLOW_BUTTON_H_
      7 #pragma once
      8 
      9 #include "chrome/browser/ui/gtk/owned_widget_gtk.h"
     10 #include "content/common/notification_observer.h"
     11 #include "content/common/notification_registrar.h"
     12 
     13 typedef struct _GtkWidget GtkWidget;
     14 class Profile;
     15 
     16 // An overflow chevron button. The button itself is a plain gtk_chrome_button,
     17 // and this class handles theming it.
     18 class OverflowButton : public NotificationObserver {
     19  public:
     20   explicit OverflowButton(Profile* profile);
     21   virtual ~OverflowButton();
     22 
     23   GtkWidget* widget() { return widget_.get(); }
     24 
     25  private:
     26   // NotificationObserver implementation.
     27   virtual void Observe(NotificationType type,
     28                        const NotificationSource& source,
     29                        const NotificationDetails& details);
     30 
     31   OwnedWidgetGtk widget_;
     32 
     33   Profile* profile_;
     34 
     35   NotificationRegistrar registrar_;
     36 };
     37 
     38 #endif  // CHROME_BROWSER_UI_GTK_OVERFLOW_BUTTON_H_
     39