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

Side by Side Diff: athena/home/athena_start_page_view.cc

Issue 515723003: Shows the static logo image in athena home card. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « athena/home/app_list_view_delegate.cc ('k') | no next file » | 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 "athena/home/athena_start_page_view.h" 5 #include "athena/home/athena_start_page_view.h"
6 6
7 #include "athena/home/home_card_constants.h" 7 #include "athena/home/home_card_constants.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "third_party/skia/include/core/SkPaint.h" 10 #include "third_party/skia/include/core/SkPaint.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 background_ = new views::View(); 164 background_ = new views::View();
165 background_->set_background( 165 background_->set_background(
166 views::Background::CreateSolidBackground(SK_ColorWHITE)); 166 views::Background::CreateSolidBackground(SK_ColorWHITE));
167 background_->SetPaintToLayer(true); 167 background_->SetPaintToLayer(true);
168 background_->SetFillsBoundsOpaquely(false); 168 background_->SetFillsBoundsOpaquely(false);
169 AddChildView(background_); 169 AddChildView(background_);
170 170
171 logo_ = view_delegate->CreateStartPageWebView( 171 logo_ = view_delegate->CreateStartPageWebView(
172 gfx::Size(kWebViewWidth, kWebViewHeight)); 172 gfx::Size(kWebViewWidth, kWebViewHeight));
173 logo_->SetPaintToLayer(true); 173 logo_->SetPaintToLayer(true);
174 logo_->SetSize(logo_->GetPreferredSize()); 174 logo_->SetFillsBoundsOpaquely(false);
175 logo_->SetSize(gfx::Size(kWebViewWidth, kWebViewHeight));
175 AddChildView(logo_); 176 AddChildView(logo_);
176 177
177 search_results_view_ = new app_list::SearchResultListView( 178 search_results_view_ = new app_list::SearchResultListView(
178 NULL, view_delegate); 179 NULL, view_delegate);
179 // search_results_view_'s size will shrink after settings results. 180 // search_results_view_'s size will shrink after settings results.
180 search_results_height_ = static_cast<views::View*>( 181 search_results_height_ = static_cast<views::View*>(
181 search_results_view_)->GetHeightForWidth(kSearchBoxWidth); 182 search_results_view_)->GetHeightForWidth(kSearchBoxWidth);
182 search_results_view_->SetResults(view_delegate->GetModel()->results()); 183 search_results_view_->SetResults(view_delegate->GetModel()->results());
183 184
184 search_results_view_->SetVisible(false); 185 search_results_view_->SetVisible(false);
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 base::TrimWhitespace( 395 base::TrimWhitespace(
395 delegate_->GetModel()->search_box()->text(), base::TRIM_ALL, &query); 396 delegate_->GetModel()->search_box()->text(), base::TRIM_ALL, &query);
396 397
397 if (!query.empty()) 398 if (!query.empty())
398 search_results_view_->SetSelectedIndex(0); 399 search_results_view_->SetSelectedIndex(0);
399 400
400 LayoutSearchResults(!query.empty()); 401 LayoutSearchResults(!query.empty());
401 } 402 }
402 403
403 } // namespace athena 404 } // namespace athena
OLDNEW
« no previous file with comments | « athena/home/app_list_view_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698