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

Side by Side Diff: ui/app_list/views/search_result_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_view.h ('k') | ui/app_list/views/speech_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_view.h" 5 #include "ui/app_list/views/search_result_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/app_list/app_list_constants.h" 9 #include "ui/app_list/app_list_constants.h"
10 #include "ui/app_list/search_result.h" 10 #include "ui/app_list/search_result.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } else { 126 } else {
127 details_text_.reset(CreateRenderText(result_->details(), 127 details_text_.reset(CreateRenderText(result_->details(),
128 result_->details_tags())); 128 result_->details_tags()));
129 } 129 }
130 } 130 }
131 131
132 const char* SearchResultView::GetClassName() const { 132 const char* SearchResultView::GetClassName() const {
133 return kViewClassName; 133 return kViewClassName;
134 } 134 }
135 135
136 gfx::Size SearchResultView::GetPreferredSize() { 136 gfx::Size SearchResultView::GetPreferredSize() const {
137 return gfx::Size(kPreferredWidth, kPreferredHeight); 137 return gfx::Size(kPreferredWidth, kPreferredHeight);
138 } 138 }
139 139
140 void SearchResultView::Layout() { 140 void SearchResultView::Layout() {
141 gfx::Rect rect(GetContentsBounds()); 141 gfx::Rect rect(GetContentsBounds());
142 if (rect.IsEmpty()) 142 if (rect.IsEmpty())
143 return; 143 return;
144 144
145 gfx::Rect icon_bounds(rect); 145 gfx::Rect icon_bounds(rect);
146 icon_bounds.set_width(kIconViewWidth); 146 icon_bounds.set_width(kIconViewWidth);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 NULL, 346 NULL,
347 gfx::Rect(point, gfx::Size()), 347 gfx::Rect(point, gfx::Size()),
348 views::MENU_ANCHOR_TOPLEFT, 348 views::MENU_ANCHOR_TOPLEFT,
349 source_type, 349 source_type,
350 views::MenuRunner::HAS_MNEMONICS) == 350 views::MenuRunner::HAS_MNEMONICS) ==
351 views::MenuRunner::MENU_DELETED) 351 views::MenuRunner::MENU_DELETED)
352 return; 352 return;
353 } 353 }
354 354
355 } // namespace app_list 355 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_result_view.h ('k') | ui/app_list/views/speech_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698