| 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_AVATAR_MENU_BUTTON_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" | 11 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
| 12 #include "ui/base/gtk/gtk_signal.h" | 12 #include "ui/base/gtk/gtk_signal.h" |
| 13 #include "ui/base/gtk/owned_widget_gtk.h" | 13 #include "ui/base/gtk/owned_widget_gtk.h" |
| 14 | 14 |
| 15 class Browser; | 15 class Browser; |
| 16 class SkBitmap; | 16 class SkBitmap; |
| 17 | 17 |
| 18 // A button used to show the profile avatar. When clicked, it opens the | 18 // A button used to show the profile avatar. When clicked, it opens the |
| 19 // AvatarMenuBubbleGtk. | 19 // AvatarMenuBubbleGtk. |
| 20 class AvatarMenuButtonGtk { | 20 class AvatarMenuButtonGtk { |
| 21 public: | 21 public: |
| 22 explicit AvatarMenuButtonGtk(Browser* browser); | 22 explicit AvatarMenuButtonGtk(Browser* browser); |
| 23 | 23 |
| 24 virtual ~AvatarMenuButtonGtk(); | 24 ~AvatarMenuButtonGtk(); |
| 25 | 25 |
| 26 // Returns the button widget. | 26 // Returns the button widget. |
| 27 GtkWidget* widget() const { return widget_.get(); } | 27 GtkWidget* widget() const { return widget_.get(); } |
| 28 | 28 |
| 29 // Sets the location the arrow should be displayed on the menu bubble. | 29 // Sets the location the arrow should be displayed on the menu bubble. |
| 30 void set_menu_arrow_location(BubbleGtk::ArrowLocationGtk arrow_location) { | 30 void set_menu_arrow_location(BubbleGtk::ArrowLocationGtk arrow_location) { |
| 31 arrow_location_ = arrow_location; | 31 arrow_location_ = arrow_location; |
| 32 } | 32 } |
| 33 | 33 |
| 34 // Sets the image to display on the button, typically the profile icon. | 34 // Sets the image to display on the button, typically the profile icon. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 50 // A weak pointer to a browser. Used to create the bubble menu. | 50 // A weak pointer to a browser. Used to create the bubble menu. |
| 51 Browser* browser_; | 51 Browser* browser_; |
| 52 | 52 |
| 53 // Which side of the bubble to display the arrow. | 53 // Which side of the bubble to display the arrow. |
| 54 BubbleGtk::ArrowLocationGtk arrow_location_; | 54 BubbleGtk::ArrowLocationGtk arrow_location_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButtonGtk); | 56 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButtonGtk); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_ | 59 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_ |
| OLD | NEW |