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

Side by Side Diff: ui/app_list/views/custom_launcher_page_view.cc

Issue 1898633004: Views: Add new SetFocusBehavior method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 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
OLDNEW
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
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(FocusBehavior::ALWAYS);
44 } 44 }
45 45
46 void CustomLauncherPageView::OnWillBeHidden() { 46 void CustomLauncherPageView::OnWillBeHidden() {
47 custom_launcher_page_contents_->SetFocusable(false); 47 custom_launcher_page_contents_->SetFocusBehavior(FocusBehavior::NEVER);
48 } 48 }
49 49
50 } // namespace app_list 50 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/website_settings/permission_selector_view.cc ('k') | ui/app_list/views/folder_header_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698