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

Unified Diff: chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc
diff --git a/chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc b/chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc
index 87cb0568117114bda4c4c51f8ccd18d7a593e851..3a133d5afe7f7624616c1f89c5acf617c8b10c26 100644
--- a/chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc
+++ b/chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc
@@ -220,7 +220,7 @@ class ProfileItemView : public views::CustomButton,
AvatarMenuBubbleView* parent,
AvatarMenu* menu);
- virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const OVERRIDE;
virtual void Layout() OVERRIDE;
virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
@@ -297,7 +297,7 @@ ProfileItemView::ProfileItemView(const AvatarMenu::Item& item,
OnHighlightStateChanged();
}
-gfx::Size ProfileItemView::GetPreferredSize() {
+gfx::Size ProfileItemView::GetPreferredSize() const {
int text_width = std::max(name_label_->GetPreferredSize().width(),
sync_state_label_->GetPreferredSize().width());
text_width = std::max(edit_link_->GetPreferredSize().width(), text_width);
@@ -537,7 +537,7 @@ AvatarMenuBubbleView::AvatarMenuBubbleView(
AvatarMenuBubbleView::~AvatarMenuBubbleView() {
}
-gfx::Size AvatarMenuBubbleView::GetPreferredSize() {
+gfx::Size AvatarMenuBubbleView::GetPreferredSize() const {
const int kBubbleViewMinWidth = 175;
gfx::Size preferred_size(kBubbleViewMinWidth, 0);
for (size_t i = 0; i < item_views_.size(); ++i) {
@@ -700,7 +700,7 @@ void AvatarMenuBubbleView::LinkClicked(views::Link* source, int event_flags) {
}
}
-gfx::Rect AvatarMenuBubbleView::GetAnchorRect() {
+gfx::Rect AvatarMenuBubbleView::GetAnchorRect() const {
return anchor_rect_;
}
« no previous file with comments | « chrome/browser/ui/views/profiles/avatar_menu_bubble_view.h ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698