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

Unified Diff: chrome/browser/ui/views/password_generation_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/password_generation_bubble_view.cc
diff --git a/chrome/browser/ui/views/password_generation_bubble_view.cc b/chrome/browser/ui/views/password_generation_bubble_view.cc
index d86d3df0b238eb2d2165e388b25bc1d1ce5c62ad..deb2dac3b14d94e91f380d903d48df1175de3b75 100644
--- a/chrome/browser/ui/views/password_generation_bubble_view.cc
+++ b/chrome/browser/ui/views/password_generation_bubble_view.cc
@@ -54,7 +54,7 @@ class TextfieldWrapper : public views::View {
virtual ~TextfieldWrapper();
virtual void Layout() OVERRIDE;
- virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const OVERRIDE;
private:
gfx::Size GetImageSize() const;
@@ -96,7 +96,7 @@ void TextfieldWrapper::Layout() {
image_button_->SetSize(GetImageSize());
}
-gfx::Size TextfieldWrapper::GetPreferredSize() {
+gfx::Size TextfieldWrapper::GetPreferredSize() const {
int width = (textfield_->GetPreferredSize().width() +
GetImageSize().width() +
kTextfieldHorizontalPadding * 3);
@@ -196,7 +196,7 @@ void PasswordGenerationBubbleView::Layout() {
textfield_wrapper_->GetPreferredSize().height() + kWrapperBorderSize * 2);
}
-gfx::Size PasswordGenerationBubbleView::GetPreferredSize() {
+gfx::Size PasswordGenerationBubbleView::GetPreferredSize() const {
int width = (textfield_wrapper_->GetPreferredSize().width() +
kButtonHorizontalSpacing +
kButtonWidth - 1);
@@ -206,7 +206,7 @@ gfx::Size PasswordGenerationBubbleView::GetPreferredSize() {
return gfx::Size(width, height);
}
-gfx::Rect PasswordGenerationBubbleView::GetAnchorRect() {
+gfx::Rect PasswordGenerationBubbleView::GetAnchorRect() const {
return anchor_rect_;
}
« no previous file with comments | « chrome/browser/ui/views/password_generation_bubble_view.h ('k') | chrome/browser/ui/views/profiles/avatar_menu_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698