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

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

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review. Created 7 years, 8 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 "ash/shell/window_type_launcher.h" 5 #include "ash/shell/window_type_launcher.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/screensaver/screensaver_view.h" 8 #include "ash/screensaver/screensaver_view.h"
9 #include "ash/session_state_delegate.h"
9 #include "ash/shelf/shelf_widget.h" 10 #include "ash/shelf/shelf_widget.h"
10 #include "ash/shell.h" 11 #include "ash/shell.h"
11 #include "ash/shell/example_factory.h" 12 #include "ash/shell/example_factory.h"
12 #include "ash/shell/panel_window.h" 13 #include "ash/shell/panel_window.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_window_ids.h" 15 #include "ash/shell_window_ids.h"
16 #include "ash/system/status_area_widget.h" 16 #include "ash/system/status_area_widget.h"
17 #include "ash/system/web_notification/web_notification_tray.h" 17 #include "ash/system/web_notification/web_notification_tray.h"
18 #include "base/bind.h" 18 #include "base/bind.h"
19 #include "base/time.h" 19 #include "base/time.h"
20 #include "base/utf_string_conversions.h" 20 #include "base/utf_string_conversions.h"
21 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
22 #include "ui/aura/root_window.h" 22 #include "ui/aura/root_window.h"
23 #include "ui/aura/window.h" 23 #include "ui/aura/window.h"
24 #include "ui/compositor/layer.h" 24 #include "ui/compositor/layer.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 params.can_maximize = true; 329 params.can_maximize = true;
330 params.persist_across_all_workspaces = true; 330 params.persist_across_all_workspaces = true;
331 ToplevelWindow::CreateToplevelWindow(params); 331 ToplevelWindow::CreateToplevelWindow(params);
332 } else if (sender == panel_button_) { 332 } else if (sender == panel_button_) {
333 PanelWindow::CreatePanelWindow(gfx::Rect()); 333 PanelWindow::CreatePanelWindow(gfx::Rect());
334 } else if (sender == create_nonresizable_button_) { 334 } else if (sender == create_nonresizable_button_) {
335 ToplevelWindow::CreateToplevelWindow(ToplevelWindow::CreateParams()); 335 ToplevelWindow::CreateToplevelWindow(ToplevelWindow::CreateParams());
336 } else if (sender == bubble_button_) { 336 } else if (sender == bubble_button_) {
337 CreatePointyBubble(sender); 337 CreatePointyBubble(sender);
338 } else if (sender == lock_button_) { 338 } else if (sender == lock_button_) {
339 Shell::GetInstance()->delegate()->LockScreen(); 339 Shell::GetInstance()->session_state_delegate()->LockScreen();
340 } else if (sender == widgets_button_) { 340 } else if (sender == widgets_button_) {
341 CreateWidgetsWindow(); 341 CreateWidgetsWindow();
342 } else if (sender == system_modal_button_) { 342 } else if (sender == system_modal_button_) {
343 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), 343 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(),
344 ui::MODAL_TYPE_SYSTEM); 344 ui::MODAL_TYPE_SYSTEM);
345 } else if (sender == window_modal_button_) { 345 } else if (sender == window_modal_button_) {
346 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), 346 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(),
347 ui::MODAL_TYPE_WINDOW); 347 ui::MODAL_TYPE_WINDOW);
348 } else if (sender == child_modal_button_) { 348 } else if (sender == child_modal_button_) {
349 views::test::CreateChildModalParent( 349 views::test::CreateChildModalParent(
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), 409 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
410 MenuItemView::TOPLEFT, 410 MenuItemView::TOPLEFT,
411 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == 411 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) ==
412 MenuRunner::MENU_DELETED) 412 MenuRunner::MENU_DELETED)
413 return; 413 return;
414 } 414 }
415 #endif // !defined(OS_MACOSX) 415 #endif // !defined(OS_MACOSX)
416 416
417 } // namespace shell 417 } // namespace shell
418 } // namespace ash 418 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698