OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/custom_launcher_page_view.h" | 5 #include "ui/app_list/views/custom_launcher_page_view.h" |
6 | 6 |
7 #include "ui/app_list/app_list_constants.h" | 7 #include "ui/app_list/app_list_constants.h" |
8 #include "ui/views/layout/fill_layout.h" | 8 #include "ui/views/layout/fill_layout.h" |
9 | 9 |
10 namespace app_list { | 10 namespace app_list { |
(...skipping 22 matching lines...) Expand all Loading... |
33 case AppListModel::STATE_CUSTOM_LAUNCHER_PAGE: | 33 case AppListModel::STATE_CUSTOM_LAUNCHER_PAGE: |
34 return onscreen_bounds; | 34 return onscreen_bounds; |
35 case AppListModel::STATE_START: | 35 case AppListModel::STATE_START: |
36 return GetCollapsedLauncherPageBounds(); | 36 return GetCollapsedLauncherPageBounds(); |
37 default: | 37 default: |
38 return GetBelowContentsOffscreenBounds(onscreen_bounds.size()); | 38 return GetBelowContentsOffscreenBounds(onscreen_bounds.size()); |
39 } | 39 } |
40 } | 40 } |
41 | 41 |
42 void CustomLauncherPageView::OnShown() { | 42 void CustomLauncherPageView::OnShown() { |
43 custom_launcher_page_contents_->SetFocusable(true); | 43 custom_launcher_page_contents_->SetFocusBehavior( |
| 44 views::View::FocusBehavior::ALWAYS); |
44 } | 45 } |
45 | 46 |
46 void CustomLauncherPageView::OnWillBeHidden() { | 47 void CustomLauncherPageView::OnWillBeHidden() { |
47 custom_launcher_page_contents_->SetFocusable(false); | 48 custom_launcher_page_contents_->SetFocusBehavior( |
| 49 views::View::FocusBehavior::NEVER); |
48 } | 50 } |
49 | 51 |
50 } // namespace app_list | 52 } // namespace app_list |
OLD | NEW |