| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| 6 #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // How much padding to put on the left and right of the menu marker. | 44 // How much padding to put on the left and right of the menu marker. |
| 45 static const int kMenuMarkerPaddingLeft; | 45 static const int kMenuMarkerPaddingLeft; |
| 46 static const int kMenuMarkerPaddingRight; | 46 static const int kMenuMarkerPaddingRight; |
| 47 | 47 |
| 48 // Create a Button. | 48 // Create a Button. |
| 49 MenuButton(ButtonListener* listener, | 49 MenuButton(ButtonListener* listener, |
| 50 const base::string16& text, | 50 const base::string16& text, |
| 51 MenuButtonListener* menu_button_listener, | 51 MenuButtonListener* menu_button_listener, |
| 52 bool show_menu_marker); | 52 bool show_menu_marker); |
| 53 virtual ~MenuButton(); | 53 ~MenuButton() override; |
| 54 | 54 |
| 55 bool show_menu_marker() const { return show_menu_marker_; } | 55 bool show_menu_marker() const { return show_menu_marker_; } |
| 56 void set_menu_marker(const gfx::ImageSkia* menu_marker) { | 56 void set_menu_marker(const gfx::ImageSkia* menu_marker) { |
| 57 menu_marker_ = menu_marker; | 57 menu_marker_ = menu_marker; |
| 58 } | 58 } |
| 59 const gfx::ImageSkia* menu_marker() const { return menu_marker_; } | 59 const gfx::ImageSkia* menu_marker() const { return menu_marker_; } |
| 60 | 60 |
| 61 const gfx::Point& menu_offset() const { return menu_offset_; } | 61 const gfx::Point& menu_offset() const { return menu_offset_; } |
| 62 void set_menu_offset(int x, int y) { menu_offset_.SetPoint(x, y); } | 62 void set_menu_offset(int x, int y) { menu_offset_.SetPoint(x, y); } |
| 63 | 63 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 int pressed_lock_count_; | 128 int pressed_lock_count_; |
| 129 | 129 |
| 130 base::WeakPtrFactory<MenuButton> weak_factory_; | 130 base::WeakPtrFactory<MenuButton> weak_factory_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(MenuButton); | 132 DISALLOW_COPY_AND_ASSIGN(MenuButton); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 } // namespace views | 135 } // namespace views |
| 136 | 136 |
| 137 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ | 137 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ |
| OLD | NEW |