| 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_UI_GTK_PROFILE_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_PROFILE_MENU_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_PROFILE_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_GTK_PROFILE_MENU_BUTTON_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "chrome/browser/ui/gtk/menu_gtk.h" | 13 #include "chrome/browser/ui/gtk/menu_gtk.h" |
| 14 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" | 14 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" |
| 15 | 15 |
| 16 class Profile; | 16 class Browser; |
| 17 class ProfileMenuModel; | 17 class ProfileMenuModel; |
| 18 | 18 |
| 19 // Shows the button for the multiprofile menu. | 19 // Shows the button for the multiprofile menu. |
| 20 class ProfileMenuButton { | 20 class ProfileMenuButton { |
| 21 public: | 21 public: |
| 22 explicit ProfileMenuButton(Profile* profile); | 22 explicit ProfileMenuButton(Browser* browser); |
| 23 | 23 |
| 24 virtual ~ProfileMenuButton(); | 24 virtual ~ProfileMenuButton(); |
| 25 | 25 |
| 26 virtual void UpdateText(); | 26 virtual void UpdateText(); |
| 27 | 27 |
| 28 GtkWidget* widget() const { return widget_.get(); } | 28 GtkWidget* widget() const { return widget_.get(); } |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 CHROMEGTK_CALLBACK_1(ProfileMenuButton, gboolean, OnButtonPressed, | 31 CHROMEGTK_CALLBACK_1(ProfileMenuButton, gboolean, OnButtonPressed, |
| 32 GdkEventButton*); | 32 GdkEventButton*); |
| 33 | 33 |
| 34 scoped_ptr<MenuGtk> menu_; | 34 scoped_ptr<MenuGtk> menu_; |
| 35 scoped_ptr<ProfileMenuModel> profile_menu_model_; | 35 scoped_ptr<ProfileMenuModel> profile_menu_model_; |
| 36 OwnedWidgetGtk widget_; | 36 OwnedWidgetGtk widget_; |
| 37 Profile* profile_; | 37 Browser* browser_; |
| 38 | 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(ProfileMenuButton); | 39 DISALLOW_COPY_AND_ASSIGN(ProfileMenuButton); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 #endif // CHROME_BROWSER_UI_GTK_PROFILE_MENU_BUTTON_H_ | 42 #endif // CHROME_BROWSER_UI_GTK_PROFILE_MENU_BUTTON_H_ |
| OLD | NEW |