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

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

Issue 512963002: Clears focus on gesture event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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 | « no previous file | athena/home/home_card_constants.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 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 control_icon_container_->SetFillsBoundsOpaquely(false); 204 control_icon_container_->SetFillsBoundsOpaquely(false);
205 AddChildView(control_icon_container_); 205 AddChildView(control_icon_container_);
206 control_icon_container_->SetLayoutManager(new views::BoxLayout( 206 control_icon_container_->SetLayoutManager(new views::BoxLayout(
207 views::BoxLayout::kHorizontal, 0, 0, kIconMargin)); 207 views::BoxLayout::kHorizontal, 0, 0, kIconMargin));
208 for (size_t i = 0; i < kMaxIconNum; ++i) 208 for (size_t i = 0; i < kMaxIconNum; ++i)
209 control_icon_container_->AddChildView(new PlaceHolderButton()); 209 control_icon_container_->AddChildView(new PlaceHolderButton());
210 control_icon_container_->SetSize(control_icon_container_->GetPreferredSize()); 210 control_icon_container_->SetSize(control_icon_container_->GetPreferredSize());
211 211
212 search_box_view_ = new app_list::SearchBoxView(this, view_delegate); 212 search_box_view_ = new app_list::SearchBoxView(this, view_delegate);
213 search_box_view_->set_contents_view(this); 213 search_box_view_->set_contents_view(this);
214 search_box_view_->search_box()->set_id(kHomeCardSearchBoxId);
214 search_box_container_ = new SearchBoxContainer(search_box_view_); 215 search_box_container_ = new SearchBoxContainer(search_box_view_);
215 search_box_container_->SetPaintToLayer(true); 216 search_box_container_->SetPaintToLayer(true);
216 search_box_container_->SetFillsBoundsOpaquely(false); 217 search_box_container_->SetFillsBoundsOpaquely(false);
217 search_box_container_->SetSize(search_box_container_->GetPreferredSize()); 218 search_box_container_->SetSize(search_box_container_->GetPreferredSize());
218 AddChildView(search_box_container_); 219 AddChildView(search_box_container_);
219 } 220 }
220 221
221 AthenaStartPageView::~AthenaStartPageView() {} 222 AthenaStartPageView::~AthenaStartPageView() {}
222 223
223 void AthenaStartPageView::RequestFocusOnSearchBox() { 224 void AthenaStartPageView::RequestFocusOnSearchBox() {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 base::TrimWhitespace( 396 base::TrimWhitespace(
396 delegate_->GetModel()->search_box()->text(), base::TRIM_ALL, &query); 397 delegate_->GetModel()->search_box()->text(), base::TRIM_ALL, &query);
397 398
398 if (!query.empty()) 399 if (!query.empty())
399 search_results_view_->SetSelectedIndex(0); 400 search_results_view_->SetSelectedIndex(0);
400 401
401 LayoutSearchResults(!query.empty()); 402 LayoutSearchResults(!query.empty());
402 } 403 }
403 404
404 } // namespace athena 405 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | athena/home/home_card_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698