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

Unified Diff: chrome/browser/ui/views/profiles/avatar_menu_button.h

Issue 1452923002: Vectorize MD otr frame icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dont crash in tests Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/profiles/avatar_menu_button.h
diff --git a/chrome/browser/ui/views/profiles/avatar_menu_button.h b/chrome/browser/ui/views/profiles/avatar_menu_button.h
index 343e4670fda9704f7f6058763a114ec1241d9233..a28dc92d6c86ba506d70a51f5a7f77fd97a10f4c 100644
--- a/chrome/browser/ui/views/profiles/avatar_menu_button.h
+++ b/chrome/browser/ui/views/profiles/avatar_menu_button.h
@@ -17,7 +17,7 @@ namespace gfx {
class Canvas;
class Image;
}
-class Browser;
+class BrowserView;
class Profile;
// AvatarMenuButton
@@ -32,9 +32,8 @@ class AvatarMenuButton : public views::MenuButton,
// Internal class name.
static const char kViewClassName[];
- // Creates a new button. Unless |disabled| is true, clicking on the button
- // will cause the profile menu to be displayed.
- AvatarMenuButton(Browser* browser, bool disabled);
+ // Creates a new button for the given browser view.
+ explicit AvatarMenuButton(BrowserView* browser_view);
~AvatarMenuButton() override;
@@ -51,12 +50,12 @@ class AvatarMenuButton : public views::MenuButton,
}
bool button_on_right() { return button_on_right_; }
- // Get avatar images for the profile. |avatar| is used in the browser window
- // whereas |taskbar_badge_avatar| is used for the OS taskbar. If
+ // Get avatar images for the BrowserView. |avatar| is used in the browser
+ // window whereas |taskbar_badge_avatar| is used for the OS taskbar. If
// |taskbar_badge_avatar| is empty then |avatar| should be used for the
// taskbar as well. Returns false if the cache doesn't have an entry for a
- // Profile::REGULAR_PROFILE type |profile|, otherwise return true.
- static bool GetAvatarImages(Profile* profile,
+ // Profile::REGULAR_PROFILE type Profile, otherwise return true.
+ static bool GetAvatarImages(BrowserView* browser_view,
bool should_show_avatar_menu,
gfx::Image* avatar,
gfx::Image* taskbar_badge_avatar,
@@ -71,8 +70,8 @@ class AvatarMenuButton : public views::MenuButton,
void OnMenuButtonClicked(views::View* source,
const gfx::Point& point) override;
- Browser* browser_;
- bool disabled_;
+ BrowserView* browser_view_;
+ bool enabled_;
scoped_ptr<ui::MenuModel> menu_model_;
// Use a scoped ptr because gfx::Image doesn't have a default constructor.

Powered by Google App Engine
This is Rietveld 408576698