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

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

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots Created 8 years, 4 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 CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_
6 #define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_ 6 #define CHROME_BROWSER_UI_VIEWS_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 21 matching lines...) Expand all
32 public views::MenuButtonListener { 32 public views::MenuButtonListener {
33 public: 33 public:
34 // Creates a new button. If |incognito| is true and we're not in managed mode, 34 // Creates a new button. If |incognito| is true and we're not in managed mode,
35 // clicking on the button will cause the profile menu to be displayed. 35 // clicking on the button will cause the profile menu to be displayed.
36 AvatarMenuButton(Browser* browser, bool incognito); 36 AvatarMenuButton(Browser* browser, bool incognito);
37 37
38 virtual ~AvatarMenuButton(); 38 virtual ~AvatarMenuButton();
39 39
40 // views::MenuButton: 40 // views::MenuButton:
41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
42 virtual bool HitTest(const gfx::Point& point) const OVERRIDE; 42 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
43 43
44 virtual void SetAvatarIcon(const gfx::Image& icon, 44 virtual void SetAvatarIcon(const gfx::Image& icon,
45 bool is_gaia_picture); 45 bool is_gaia_picture);
46 46
47 void ShowAvatarBubble(); 47 void ShowAvatarBubble();
48 48
49 private: 49 private:
50 // views::MenuButtonListener: 50 // views::MenuButtonListener:
51 virtual void OnMenuButtonClicked(views::View* source, 51 virtual void OnMenuButtonClicked(views::View* source,
52 const gfx::Point& point) OVERRIDE; 52 const gfx::Point& point) OVERRIDE;
53 53
54 void ButtonClicked(); 54 void ButtonClicked();
55 55
56 Browser* browser_; 56 Browser* browser_;
57 bool incognito_; 57 bool incognito_;
58 scoped_ptr<ui::MenuModel> menu_model_; 58 scoped_ptr<ui::MenuModel> menu_model_;
59 59
60 // Use a scoped ptr because gfx::Image doesn't have a default constructor. 60 // Use a scoped ptr because gfx::Image doesn't have a default constructor.
61 scoped_ptr<gfx::Image> icon_; 61 scoped_ptr<gfx::Image> icon_;
62 gfx::ImageSkia button_icon_; 62 gfx::ImageSkia button_icon_;
63 bool is_gaia_picture_; 63 bool is_gaia_picture_;
64 int old_height_; 64 int old_height_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButton); 66 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButton);
67 }; 67 };
68 68
69 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_ 69 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_bubble_view.cc ('k') | chrome/browser/ui/views/avatar_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698