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

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

Issue 2111443002: mash: Migrate SessionStateDelegate access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 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
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 <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
11 #include "ash/common/wm_shell.h"
11 #include "ash/shell.h" 12 #include "ash/shell.h"
12 #include "ash/shell/example_factory.h" 13 #include "ash/shell/example_factory.h"
13 #include "ash/shell/toplevel_window.h" 14 #include "ash/shell/toplevel_window.h"
14 #include "ash/shell_delegate.h" 15 #include "ash/shell_delegate.h"
15 #include "base/callback.h" 16 #include "base/callback.h"
16 #include "base/files/file_path.h" 17 #include "base/files/file_path.h"
17 #include "base/i18n/case_conversion.h" 18 #include "base/i18n/case_conversion.h"
18 #include "base/i18n/string_search.h" 19 #include "base/i18n/string_search.h"
19 #include "base/memory/scoped_vector.h" 20 #include "base/memory/scoped_vector.h"
20 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 ToplevelWindow::CreateParams params; 106 ToplevelWindow::CreateParams params;
106 params.can_resize = true; 107 params.can_resize = true;
107 ToplevelWindow::CreateToplevelWindow(params); 108 ToplevelWindow::CreateToplevelWindow(params);
108 break; 109 break;
109 } 110 }
110 case NON_RESIZABLE_WINDOW: { 111 case NON_RESIZABLE_WINDOW: {
111 ToplevelWindow::CreateToplevelWindow(ToplevelWindow::CreateParams()); 112 ToplevelWindow::CreateToplevelWindow(ToplevelWindow::CreateParams());
112 break; 113 break;
113 } 114 }
114 case LOCK_SCREEN: { 115 case LOCK_SCREEN: {
115 Shell::GetInstance()->session_state_delegate()->LockScreen(); 116 WmShell::Get()->GetSessionStateDelegate()->LockScreen();
116 break; 117 break;
117 } 118 }
118 case WIDGETS_WINDOW: { 119 case WIDGETS_WINDOW: {
119 CreateWidgetsWindow(); 120 CreateWidgetsWindow();
120 break; 121 break;
121 } 122 }
122 case EXAMPLES_WINDOW: { 123 case EXAMPLES_WINDOW: {
123 views::examples::ShowExamplesWindow( 124 views::examples::ShowExamplesWindow(
124 views::examples::QUIT_ON_CLOSE, NULL, 125 views::examples::QUIT_ON_CLOSE, NULL,
125 std::unique_ptr<ScopedVector<views::examples::ExampleBase>>()); 126 std::unique_ptr<ScopedVector<views::examples::ExampleBase>>());
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 298
298 void StopSearch() override { 299 void StopSearch() override {
299 // Nothing needs to be done. 300 // Nothing needs to be done.
300 } 301 }
301 302
302 void ViewInitialized() override { 303 void ViewInitialized() override {
303 // Nothing needs to be done. 304 // Nothing needs to be done.
304 } 305 }
305 306
306 void Dismiss() override { 307 void Dismiss() override {
307 DCHECK(ash::Shell::HasInstance()); 308 DCHECK(Shell::HasInstance());
308 Shell::GetInstance()->DismissAppList(); 309 Shell::GetInstance()->DismissAppList();
309 } 310 }
310 311
311 void ViewClosing() override { 312 void ViewClosing() override {
312 // Nothing needs to be done. 313 // Nothing needs to be done.
313 } 314 }
314 315
315 void OpenSettings() override { 316 void OpenSettings() override {
316 // Nothing needs to be done. 317 // Nothing needs to be done.
317 } 318 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 }; 355 };
355 356
356 } // namespace 357 } // namespace
357 358
358 app_list::AppListViewDelegate* CreateAppListViewDelegate() { 359 app_list::AppListViewDelegate* CreateAppListViewDelegate() {
359 return new ExampleAppListViewDelegate; 360 return new ExampleAppListViewDelegate;
360 } 361 }
361 362
362 } // namespace shell 363 } // namespace shell
363 } // namespace ash 364 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698