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/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/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell/example_factory.h" | 10 #include "ash/shell/example_factory.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 Shell::GetInstance()->delegate()->LockScreen(); | 315 Shell::GetInstance()->delegate()->LockScreen(); |
316 } else if (sender == widgets_button_) { | 316 } else if (sender == widgets_button_) { |
317 CreateWidgetsWindow(); | 317 CreateWidgetsWindow(); |
318 } else if (sender == system_modal_button_) { | 318 } else if (sender == system_modal_button_) { |
319 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), | 319 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), |
320 ui::MODAL_TYPE_SYSTEM); | 320 ui::MODAL_TYPE_SYSTEM); |
321 } else if (sender == window_modal_button_) { | 321 } else if (sender == window_modal_button_) { |
322 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), | 322 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), |
323 ui::MODAL_TYPE_WINDOW); | 323 ui::MODAL_TYPE_WINDOW); |
324 } else if (sender == child_modal_button_) { | 324 } else if (sender == child_modal_button_) { |
325 views::test::CreateChildModalParent(); | 325 views::test::CreateChildModalParent( |
| 326 GetWidget()->GetNativeView()->GetRootWindow()); |
326 } else if (sender == transient_button_) { | 327 } else if (sender == transient_button_) { |
327 NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView()); | 328 NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView()); |
328 } else if (sender == show_hide_window_button_) { | 329 } else if (sender == show_hide_window_button_) { |
329 NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView()); | 330 NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView()); |
330 } else if (sender == show_screensaver_) { | 331 } else if (sender == show_screensaver_) { |
331 ash::ShowScreensaver(GURL("http://www.google.com")); | 332 ash::ShowScreensaver(GURL("http://www.google.com")); |
332 content::BrowserThread::PostDelayedTask(content::BrowserThread::UI, | 333 content::BrowserThread::PostDelayedTask(content::BrowserThread::UI, |
333 FROM_HERE, | 334 FROM_HERE, |
334 base::Bind(&ash::CloseScreensaver), | 335 base::Bind(&ash::CloseScreensaver), |
335 base::TimeDelta::FromSeconds(5)); | 336 base::TimeDelta::FromSeconds(5)); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 385 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
385 MenuItemView::TOPLEFT, | 386 MenuItemView::TOPLEFT, |
386 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == | 387 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == |
387 MenuRunner::MENU_DELETED) | 388 MenuRunner::MENU_DELETED) |
388 return; | 389 return; |
389 } | 390 } |
390 #endif // !defined(OS_MACOSX) | 391 #endif // !defined(OS_MACOSX) |
391 | 392 |
392 } // namespace shell | 393 } // namespace shell |
393 } // namespace ash | 394 } // namespace ash |
OLD | NEW |