OLD | NEW |
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 "ui/app_list/views/start_page_view.h" | 5 #include "ui/app_list/views/start_page_view.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 gfx::Insets(0, 0, kSearchBoxAndTilesSpacing, 0)); | 276 gfx::Insets(0, 0, kSearchBoxAndTilesSpacing, 0)); |
277 instant_layout_manager->set_main_axis_alignment( | 277 instant_layout_manager->set_main_axis_alignment( |
278 views::BoxLayout::MAIN_AXIS_ALIGNMENT_END); | 278 views::BoxLayout::MAIN_AXIS_ALIGNMENT_END); |
279 instant_layout_manager->set_cross_axis_alignment( | 279 instant_layout_manager->set_cross_axis_alignment( |
280 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); | 280 views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER); |
281 instant_container_->SetLayoutManager(instant_layout_manager); | 281 instant_container_->SetLayoutManager(instant_layout_manager); |
282 | 282 |
283 views::View* web_view = view_delegate_->CreateStartPageWebView( | 283 views::View* web_view = view_delegate_->CreateStartPageWebView( |
284 gfx::Size(kWebViewWidth, kWebViewHeight)); | 284 gfx::Size(kWebViewWidth, kWebViewHeight)); |
285 if (web_view) { | 285 if (web_view) { |
286 web_view->SetFocusable(false); | 286 web_view->SetFocusBehavior(FocusBehavior::NEVER); |
287 instant_container_->AddChildView(web_view); | 287 instant_container_->AddChildView(web_view); |
288 } | 288 } |
289 | 289 |
290 instant_container_->AddChildView(search_box_spacer_view_); | 290 instant_container_->AddChildView(search_box_spacer_view_); |
291 } | 291 } |
292 | 292 |
293 void StartPageView::MaybeOpenCustomLauncherPage() { | 293 void StartPageView::MaybeOpenCustomLauncherPage() { |
294 // Switch to the custom page. | 294 // Switch to the custom page. |
295 ContentsView* contents_view = app_list_main_view_->contents_view(); | 295 ContentsView* contents_view = app_list_main_view_->contents_view(); |
296 if (!app_list_main_view_->ShouldShowCustomLauncherPage()) | 296 if (!app_list_main_view_->ShouldShowCustomLauncherPage()) |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 // is enabled). | 496 // is enabled). |
497 if (event->type() == ui::ET_SCROLL && event->y_offset() < 0) | 497 if (event->type() == ui::ET_SCROLL && event->y_offset() < 0) |
498 MaybeOpenCustomLauncherPage(); | 498 MaybeOpenCustomLauncherPage(); |
499 } | 499 } |
500 | 500 |
501 TileItemView* StartPageView::GetTileItemView(size_t index) { | 501 TileItemView* StartPageView::GetTileItemView(size_t index) { |
502 return tiles_container_->GetTileItemView(index); | 502 return tiles_container_->GetTileItemView(index); |
503 } | 503 } |
504 | 504 |
505 } // namespace app_list | 505 } // namespace app_list |
OLD | NEW |