Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: ui/views/controls/button/menu_button.h

Issue 24647003: Redesign of the avatar menu button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix RTL button Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 menu_marker_ = menu_marker; 44 menu_marker_ = menu_marker;
45 } 45 }
46 const gfx::ImageSkia* menu_marker() const { return menu_marker_; } 46 const gfx::ImageSkia* menu_marker() const { return menu_marker_; }
47 47
48 const gfx::Point& menu_offset() const { return menu_offset_; } 48 const gfx::Point& menu_offset() const { return menu_offset_; }
49 void set_menu_offset(int x, int y) { menu_offset_.SetPoint(x, y); } 49 void set_menu_offset(int x, int y) { menu_offset_.SetPoint(x, y); }
50 50
51 // Activate the button (called when the button is pressed). 51 // Activate the button (called when the button is pressed).
52 virtual bool Activate(); 52 virtual bool Activate();
53 53
54 // Paint the menu marker image.
55 void PaintMenuMarker(gfx::Canvas* canvas);
sky 2013/09/26 20:21:39 Why is this public?
noms (inactive) 2013/10/01 17:42:21 I changed it to protected. On 2013/09/26 20:21:3
56
54 // Overridden from TextButton for the potential use of a drop marker. 57 // Overridden from TextButton for the potential use of a drop marker.
55 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; 58 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE;
56 59
57 // Overridden from View: 60 // Overridden from View:
58 virtual gfx::Size GetPreferredSize() OVERRIDE; 61 virtual gfx::Size GetPreferredSize() OVERRIDE;
59 virtual const char* GetClassName() const OVERRIDE; 62 virtual const char* GetClassName() const OVERRIDE;
60 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; 63 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
61 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; 64 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
62 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 65 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
63 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 66 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // If non-null the destuctor sets this to true. This is set while the menu is 103 // If non-null the destuctor sets this to true. This is set while the menu is
101 // showing and used to detect if the menu was deleted while running. 104 // showing and used to detect if the menu was deleted while running.
102 bool* destroyed_flag_; 105 bool* destroyed_flag_;
103 106
104 DISALLOW_COPY_AND_ASSIGN(MenuButton); 107 DISALLOW_COPY_AND_ASSIGN(MenuButton);
105 }; 108 };
106 109
107 } // namespace views 110 } // namespace views
108 111
109 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_ 112 #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698