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

Unified Diff: chrome/browser/ui/views/translate/translate_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/translate/translate_bubble_view.cc
diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.cc b/chrome/browser/ui/views/translate/translate_bubble_view.cc
index 26080556d74c2ab61a7e84f3b00cd6cbab98acd7..9f1d43cb68c35bdf500c3383d153faba4d276396 100644
--- a/chrome/browser/ui/views/translate/translate_bubble_view.cc
+++ b/chrome/browser/ui/views/translate/translate_bubble_view.cc
@@ -243,10 +243,10 @@ bool TranslateBubbleView::AcceleratorPressed(
return BubbleDelegateView::AcceleratorPressed(accelerator);
}
-gfx::Size TranslateBubbleView::GetPreferredSize() {
+gfx::Size TranslateBubbleView::GetPreferredSize() const {
int width = 0;
for (int i = 0; i < child_count(); i++) {
- views::View* child = child_at(i);
+ const views::View* child = child_at(i);
width = std::max(width, child->GetPreferredSize().width());
}
int height = GetCurrentView()->GetPreferredSize().height();
@@ -305,7 +305,7 @@ TranslateBubbleView::TranslateBubbleView(
translate_bubble_view_ = this;
}
-views::View* TranslateBubbleView::GetCurrentView() {
+views::View* TranslateBubbleView::GetCurrentView() const {
switch (model_->GetViewState()) {
case TranslateBubbleModel::VIEW_STATE_BEFORE_TRANSLATE:
return before_translate_view_;

Powered by Google App Engine
This is Rietveld 408576698