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

Side by Side Diff: ash/ime/candidate_window_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/ime/candidate_view.cc ('k') | ash/ime/infolist_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "ash/ime/candidate_window_view.h" 5 #include "ash/ime/candidate_window_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/ime/candidate_view.h" 9 #include "ash/ime/candidate_view.h"
10 #include "ash/ime/candidate_window_constants.h" 10 #include "ash/ime/candidate_window_constants.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 SetBorder(views::Border::CreateSolidSidedBorder( 123 SetBorder(views::Border::CreateSolidSidedBorder(
124 (position == TOP) ? 1 : 0, 124 (position == TOP) ? 1 : 0,
125 0, 125 0,
126 (position == BOTTOM) ? 1 : 0, 126 (position == BOTTOM) ? 1 : 0,
127 0, 127 0,
128 GetNativeTheme()->GetSystemColor( 128 GetNativeTheme()->GetSystemColor(
129 ui::NativeTheme::kColorId_MenuBorderColor))); 129 ui::NativeTheme::kColorId_MenuBorderColor)));
130 } 130 }
131 131
132 protected: 132 protected:
133 virtual gfx::Size GetPreferredSize() OVERRIDE { 133 virtual gfx::Size GetPreferredSize() const OVERRIDE {
134 gfx::Size size = views::View::GetPreferredSize(); 134 gfx::Size size = views::View::GetPreferredSize();
135 size.SetToMax(gfx::Size(min_width_, 0)); 135 size.SetToMax(gfx::Size(min_width_, 0));
136 return size; 136 return size;
137 } 137 }
138 138
139 private: 139 private:
140 views::Label* label_; 140 views::Label* label_;
141 int min_width_; 141 int min_width_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(InformationTextArea); 143 DISALLOW_COPY_AND_ASSIGN(InformationTextArea);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 for (size_t i = 0; i < candidate_views_.size(); ++i) { 399 for (size_t i = 0; i < candidate_views_.size(); ++i) {
400 if (sender == candidate_views_[i]) { 400 if (sender == candidate_views_[i]) {
401 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i)); 401 FOR_EACH_OBSERVER(Observer, observers_, OnCandidateCommitted(i));
402 return; 402 return;
403 } 403 }
404 } 404 }
405 } 405 }
406 406
407 } // namespace ime 407 } // namespace ime
408 } // namespace ash 408 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ime/candidate_view.cc ('k') | ash/ime/infolist_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698