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

Side by Side Diff: ash/app_list/app_list_presenter_delegate.cc

Issue 2967543003: collect windows from mru_list in workspace_controller. (Closed)
Patch Set: address applist tests Created 3 years, 5 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 | ash/app_list/app_list_presenter_delegate_unittest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/app_list/app_list_presenter_delegate.h" 5 #include "ash/app_list/app_list_presenter_delegate.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/public/cpp/shelf_types.h" 8 #include "ash/public/cpp/shelf_types.h"
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
11 #include "ash/screen_util.h" 11 #include "ash/screen_util.h"
12 #include "ash/shelf/app_list_button.h" 12 #include "ash/shelf/app_list_button.h"
13 #include "ash/shelf/shelf.h" 13 #include "ash/shelf/shelf.h"
14 #include "ash/shelf/shelf_layout_manager.h" 14 #include "ash/shelf/shelf_layout_manager.h"
15 #include "ash/shelf/shelf_widget.h" 15 #include "ash/shelf/shelf_widget.h"
16 #include "ash/shell.h" 16 #include "ash/shell.h"
17 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 17 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
18 #include "ash/wm/window_state.h"
18 #include "base/command_line.h" 19 #include "base/command_line.h"
19 #include "ui/app_list/app_list_constants.h" 20 #include "ui/app_list/app_list_constants.h"
20 #include "ui/app_list/app_list_features.h" 21 #include "ui/app_list/app_list_features.h"
21 #include "ui/app_list/app_list_switches.h" 22 #include "ui/app_list/app_list_switches.h"
22 #include "ui/app_list/presenter/app_list_presenter_impl.h" 23 #include "ui/app_list/presenter/app_list_presenter_impl.h"
23 #include "ui/app_list/presenter/app_list_view_delegate_factory.h" 24 #include "ui/app_list/presenter/app_list_view_delegate_factory.h"
24 #include "ui/app_list/views/app_list_view.h" 25 #include "ui/app_list/views/app_list_view.h"
25 #include "ui/aura/window.h" 26 #include "ui/aura/window.h"
26 #include "ui/events/event.h" 27 #include "ui/events/event.h"
27 #include "ui/keyboard/keyboard_controller.h" 28 #include "ui/keyboard/keyboard_controller.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 113
113 view->Initialize(container, current_apps_page, 114 view->Initialize(container, current_apps_page,
114 Shell::Get() 115 Shell::Get()
115 ->maximize_mode_controller() 116 ->maximize_mode_controller()
116 ->IsMaximizeModeWindowManagerEnabled(), 117 ->IsMaximizeModeWindowManagerEnabled(),
117 IsSideShelf(root_window)); 118 IsSideShelf(root_window));
118 119
119 if (!app_list::features::IsFullscreenAppListEnabled()) { 120 if (!app_list::features::IsFullscreenAppListEnabled()) {
120 view->MaybeSetAnchorPoint(GetCenterOfDisplayForWindow( 121 view->MaybeSetAnchorPoint(GetCenterOfDisplayForWindow(
121 root_window, GetMinimumBoundsHeightForAppList(view))); 122 root_window, GetMinimumBoundsHeightForAppList(view)));
123 } else {
124 wm::GetWindowState(view->GetWidget()->GetNativeWindow())
125 ->set_ignored_by_shelf(!IsSideShelf(root_window));
oshima 2017/07/13 00:21:54 we should always set this to true, to keep the sam
Muyuan 2017/07/13 01:41:41 Done.
122 } 126 }
123 keyboard::KeyboardController* keyboard_controller = 127 keyboard::KeyboardController* keyboard_controller =
124 keyboard::KeyboardController::GetInstance(); 128 keyboard::KeyboardController::GetInstance();
125 if (keyboard_controller) 129 if (keyboard_controller)
126 keyboard_controller->AddObserver(this); 130 keyboard_controller->AddObserver(this);
127 Shell::Get()->AddPreTargetHandler(this); 131 Shell::Get()->AddPreTargetHandler(this);
128 132
129 // By setting us as DnD recipient, the app list knows that we can 133 // By setting us as DnD recipient, the app list knows that we can
130 // handle items. 134 // handle items.
131 Shelf* shelf = Shelf::ForWindow(root_window); 135 Shelf* shelf = Shelf::ForWindow(root_window);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 256 }
253 257
254 void AppListPresenterDelegate::OnMaximizeModeEnded() { 258 void AppListPresenterDelegate::OnMaximizeModeEnded() {
255 if (!app_list::features::IsFullscreenAppListEnabled()) 259 if (!app_list::features::IsFullscreenAppListEnabled())
256 return; 260 return;
257 261
258 view_->OnMaximizeModeChanged(false); 262 view_->OnMaximizeModeChanged(false);
259 } 263 }
260 264
261 } // namespace ash 265 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/app_list/app_list_presenter_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698