| OLD | NEW |
| 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/shell.h" |
| 8 #include "ash/shell_delegate.h" |
| 7 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 8 #include "ash/shell/example_factory.h" | 10 #include "ash/shell/example_factory.h" |
| 9 #include "ash/shell/panel_window.h" | 11 #include "ash/shell/panel_window.h" |
| 10 #include "ash/shell/toplevel_window.h" | 12 #include "ash/shell/toplevel_window.h" |
| 11 #include "ash/wm/shadow_types.h" | 13 #include "ash/wm/shadow_types.h" |
| 12 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 13 #include "ui/aura/root_window.h" | 15 #include "ui/aura/root_window.h" |
| 14 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
| 15 #include "ui/gfx/canvas.h" | 17 #include "ui/gfx/canvas.h" |
| 16 #include "ui/gfx/compositor/layer.h" | 18 #include "ui/gfx/compositor/layer.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 params.can_resize = true; | 318 params.can_resize = true; |
| 317 params.can_maximize = true; | 319 params.can_maximize = true; |
| 318 ToplevelWindow::CreateToplevelWindow(params); | 320 ToplevelWindow::CreateToplevelWindow(params); |
| 319 } else if (sender == panel_button_) { | 321 } else if (sender == panel_button_) { |
| 320 PanelWindow::CreatePanelWindow(gfx::Rect()); | 322 PanelWindow::CreatePanelWindow(gfx::Rect()); |
| 321 } else if (sender == create_nonresizable_button_) { | 323 } else if (sender == create_nonresizable_button_) { |
| 322 ToplevelWindow::CreateToplevelWindow(ToplevelWindow::CreateParams()); | 324 ToplevelWindow::CreateToplevelWindow(ToplevelWindow::CreateParams()); |
| 323 } else if (sender == bubble_button_) { | 325 } else if (sender == bubble_button_) { |
| 324 CreatePointyBubble(sender); | 326 CreatePointyBubble(sender); |
| 325 } else if (sender == lock_button_) { | 327 } else if (sender == lock_button_) { |
| 326 CreateLockScreen(); | 328 Shell::GetInstance()->delegate()->LockScreen(); |
| 327 } else if (sender == widgets_button_) { | 329 } else if (sender == widgets_button_) { |
| 328 CreateWidgetsWindow(); | 330 CreateWidgetsWindow(); |
| 329 } else if (sender == system_modal_button_) { | 331 } else if (sender == system_modal_button_) { |
| 330 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), | 332 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), |
| 331 ui::MODAL_TYPE_SYSTEM); | 333 ui::MODAL_TYPE_SYSTEM); |
| 332 } else if (sender == window_modal_button_) { | 334 } else if (sender == window_modal_button_) { |
| 333 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), | 335 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), |
| 334 ui::MODAL_TYPE_WINDOW); | 336 ui::MODAL_TYPE_WINDOW); |
| 335 } else if (sender == transient_button_) { | 337 } else if (sender == transient_button_) { |
| 336 NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView()); | 338 NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView()); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 menu_runner_.reset(new MenuRunner(root)); | 375 menu_runner_.reset(new MenuRunner(root)); |
| 374 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 376 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
| 375 MenuItemView::TOPLEFT, | 377 MenuItemView::TOPLEFT, |
| 376 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) | 378 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) |
| 377 return; | 379 return; |
| 378 } | 380 } |
| 379 #endif // !defined(OS_MACOSX) | 381 #endif // !defined(OS_MACOSX) |
| 380 | 382 |
| 381 } // namespace shell | 383 } // namespace shell |
| 382 } // namespace ash | 384 } // namespace ash |
| OLD | NEW |