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

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: unbork test 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual const char* GetClassName() const OVERRIDE; 59 virtual const char* GetClassName() const OVERRIDE;
60 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; 60 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
61 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; 61 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
62 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 62 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
63 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 63 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
64 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; 64 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
65 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; 65 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE;
66 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 66 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
67 67
68 protected: 68 protected:
69 // Paint the menu marker image.
70 void PaintMenuMarker(gfx::Canvas* canvas);
71
69 // True if the menu is currently visible. 72 // True if the menu is currently visible.
70 bool menu_visible_; 73 bool menu_visible_;
71 74
72 // Offset of the associated menu position. 75 // Offset of the associated menu position.
73 gfx::Point menu_offset_; 76 gfx::Point menu_offset_;
74 77
75 private: 78 private:
76 friend class TextButtonBackground; 79 friend class TextButtonBackground;
77 80
78 // Compute the maximum X coordinate for the current screen. MenuButtons 81 // Compute the maximum X coordinate for the current screen. MenuButtons
(...skipping 21 matching lines...) Expand all
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