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

Side by Side Diff: chrome/browser/ui/views/profiles/avatar_menu_button.h

Issue 265713007: views: Update event-related API to use PointF/RectF instead of Point/Rect. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_VIEWS_PROFILES_AVATAR_MENU_BUTTON_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUTTON_H_
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUTTON_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUTTON_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // Creates a new button. If |disabled| is true and we're not in managed mode, 32 // Creates a new button. If |disabled| is true and we're not in managed mode,
33 // clicking on the button will cause the profile menu to be displayed. 33 // clicking on the button will cause the profile menu to be displayed.
34 AvatarMenuButton(Browser* browser, bool disabled); 34 AvatarMenuButton(Browser* browser, bool disabled);
35 35
36 virtual ~AvatarMenuButton(); 36 virtual ~AvatarMenuButton();
37 37
38 // views::MenuButton: 38 // views::MenuButton:
39 virtual const char* GetClassName() const OVERRIDE; 39 virtual const char* GetClassName() const OVERRIDE;
40 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 40 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
41 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE; 41 virtual bool HitTestRect(const gfx::RectF& rect) const OVERRIDE;
42 42
43 // Sets the image for the avatar button. Rectangular images, as opposed 43 // Sets the image for the avatar button. Rectangular images, as opposed
44 // to Chrome avatar icons, will be resized and modified for the title bar. 44 // to Chrome avatar icons, will be resized and modified for the title bar.
45 virtual void SetAvatarIcon(const gfx::Image& icon, bool is_rectangle); 45 virtual void SetAvatarIcon(const gfx::Image& icon, bool is_rectangle);
46 46
47 void set_button_on_right(bool button_on_right) { 47 void set_button_on_right(bool button_on_right) {
48 button_on_right_ = button_on_right; 48 button_on_right_ = button_on_right;
49 } 49 }
50 bool button_on_right() { return button_on_right_; } 50 bool button_on_right() { return button_on_right_; }
51 51
(...skipping 13 matching lines...) Expand all
65 gfx::ImageSkia button_icon_; 65 gfx::ImageSkia button_icon_;
66 bool is_rectangle_; 66 bool is_rectangle_;
67 int old_height_; 67 int old_height_;
68 // True if the avatar button is on the right side of the browser window. 68 // True if the avatar button is on the right side of the browser window.
69 bool button_on_right_; 69 bool button_on_right_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButton); 71 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButton);
72 }; 72 };
73 73
74 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUTTON_H_ 74 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_AVATAR_MENU_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698