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

Side by Side Diff: ui/app_list/views/search_result_list_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 | « ui/app_list/views/search_result_list_view.h ('k') | ui/app_list/views/search_result_view.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/app_list/views/search_result_list_view.h" 5 #include "ui/app_list/views/search_result_list_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 void SearchResultListView::ForceAutoLaunchForTest() { 192 void SearchResultListView::ForceAutoLaunchForTest() {
193 if (auto_launch_animation_) 193 if (auto_launch_animation_)
194 AnimationEnded(auto_launch_animation_.get()); 194 AnimationEnded(auto_launch_animation_.get());
195 } 195 }
196 196
197 void SearchResultListView::Layout() { 197 void SearchResultListView::Layout() {
198 results_container_->SetBoundsRect(GetLocalBounds()); 198 results_container_->SetBoundsRect(GetLocalBounds());
199 } 199 }
200 200
201 gfx::Size SearchResultListView::GetPreferredSize() { 201 gfx::Size SearchResultListView::GetPreferredSize() const {
202 return results_container_->GetPreferredSize(); 202 return results_container_->GetPreferredSize();
203 } 203 }
204 204
205 int SearchResultListView::GetHeightForWidth(int w) { 205 int SearchResultListView::GetHeightForWidth(int w) const {
206 return results_container_->GetHeightForWidth(w); 206 return results_container_->GetHeightForWidth(w);
207 } 207 }
208 208
209 void SearchResultListView::VisibilityChanged(views::View* starting_from, 209 void SearchResultListView::VisibilityChanged(views::View* starting_from,
210 bool is_visible) { 210 bool is_visible) {
211 if (is_visible) 211 if (is_visible)
212 UpdateAutoLaunchState(); 212 UpdateAutoLaunchState();
213 else 213 else
214 CancelAutoLaunchTimeout(); 214 CancelAutoLaunchTimeout();
215 } 215 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 if (delegate_ && view->result()) 277 if (delegate_ && view->result())
278 delegate_->OnResultInstalled(view->result()); 278 delegate_->OnResultInstalled(view->result());
279 } 279 }
280 280
281 void SearchResultListView::OnSearchResultUninstalled(SearchResultView* view) { 281 void SearchResultListView::OnSearchResultUninstalled(SearchResultView* view) {
282 if (delegate_ && view->result()) 282 if (delegate_ && view->result())
283 delegate_->OnResultUninstalled(view->result()); 283 delegate_->OnResultUninstalled(view->result());
284 } 284 }
285 285
286 } // namespace app_list 286 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_result_list_view.h ('k') | ui/app_list/views/search_result_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698