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

Side by Side Diff: chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc

Issue 2939693004: Added HALF, FULLSCREEN_ALL_APPS, and FULLSCREEN_SEARCH. (Closed)
Patch Set: rebased post revert. Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h" 5 #include "chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h"
6 6
7 #include "ui/app_list/presenter/app_list_presenter_impl.h" 7 #include "ui/app_list/presenter/app_list_presenter_impl.h"
8 #include "ui/app_list/presenter/app_list_view_delegate_factory.h" 8 #include "ui/app_list/presenter/app_list_view_delegate_factory.h"
9 #include "ui/app_list/views/app_list_view.h" 9 #include "ui/app_list/views/app_list_view.h"
10 #include "ui/display/display.h" 10 #include "ui/display/display.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 app_list::AppListViewDelegate* AppListPresenterDelegateMus::GetViewDelegate() { 52 app_list::AppListViewDelegate* AppListPresenterDelegateMus::GetViewDelegate() {
53 return view_delegate_factory_->GetDelegate(); 53 return view_delegate_factory_->GetDelegate();
54 } 54 }
55 55
56 void AppListPresenterDelegateMus::Init(app_list::AppListView* view, 56 void AppListPresenterDelegateMus::Init(app_list::AppListView* view,
57 int64_t display_id, 57 int64_t display_id,
58 int current_apps_page) { 58 int current_apps_page) {
59 view_ = view; 59 view_ = view;
60 60 // TODO(newcomer): replace Initialize parameters with proper mus
61 // implementation as per crbug.com/726838
61 // Note: This would place the app list into the USER_WINDOWS container, unlike 62 // Note: This would place the app list into the USER_WINDOWS container, unlike
62 // in classic ash, where it has it's own container. 63 // in classic ash, where it has it's own container.
63 // TODO(mfomitchev): We are currently passing NULL for |parent|. It seems like 64 // TODO(mfomitchev): We are currently passing NULL for |parent|. It seems like
64 // the only thing this is used for is choosing the right scale factor in 65 // the only thing this is used for is choosing the right scale factor in
65 // AppListMainView::PreloadIcons(), so we take care of that - perhaps by 66 // AppListMainView::PreloadIcons(), so we take care of that - perhaps by
66 // passing the display_id or the scale factor directly 67 // passing the display_id or the scale factor directly
67 view->Initialize(nullptr /* parent */, current_apps_page); 68 view->Initialize(nullptr /* parent */, current_apps_page, false, false);
68 69
69 view->MaybeSetAnchorPoint( 70 view->MaybeSetAnchorPoint(
70 GetCenterOfDisplay(display_id, GetMinimumBoundsHeightForAppList(view))); 71 GetCenterOfDisplay(display_id, GetMinimumBoundsHeightForAppList(view)));
71 72
72 // TODO(mfomitchev): Setup updating bounds on keyboard bounds change. 73 // TODO(mfomitchev): Setup updating bounds on keyboard bounds change.
73 // TODO(mfomitchev): Setup dismissing on maximize (touch-view) mode start/end. 74 // TODO(mfomitchev): Setup dismissing on maximize (touch-view) mode start/end.
74 // TODO(mfomitchev): Setup DnD. 75 // TODO(mfomitchev): Setup DnD.
75 // TODO(mfomitchev): UpdateAutoHideState for shelf 76 // TODO(mfomitchev): UpdateAutoHideState for shelf
76 } 77 }
77 78
(...skipping 26 matching lines...) Expand all
104 void AppListPresenterDelegateMus::OnPointerEventObserved( 105 void AppListPresenterDelegateMus::OnPointerEventObserved(
105 const ui::PointerEvent& event, 106 const ui::PointerEvent& event,
106 const gfx::Point& location_in_screen, 107 const gfx::Point& location_in_screen,
107 views::Widget* target) { 108 views::Widget* target) {
108 // Dismiss app list on a mouse click or touch outside of the app list window. 109 // Dismiss app list on a mouse click or touch outside of the app list window.
109 if ((event.type() == ui::ET_TOUCH_PRESSED || 110 if ((event.type() == ui::ET_TOUCH_PRESSED ||
110 event.type() == ui::ET_POINTER_DOWN) && 111 event.type() == ui::ET_POINTER_DOWN) &&
111 (!target || (view_ && (target != view_->GetWidget())))) 112 (!target || (view_ && (target != view_->GetWidget()))))
112 presenter_->Dismiss(); 113 presenter_->Dismiss();
113 } 114 }
OLDNEW
« no previous file with comments | « ash/app_list/app_list_presenter_delegate_unittest.cc ('k') | ui/app_list/demo/app_list_demo_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698