| Index: ash/shell/window_type_launcher.cc
|
| diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc
|
| index f3abad27a6fe7b610dbd7d4fbb2d20bcb13e5a31..020ec0061e7573a2b0948c3ddc6c040e8b850112 100644
|
| --- a/ash/shell/window_type_launcher.cc
|
| +++ b/ash/shell/window_type_launcher.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "ash/shell/window_type_launcher.h"
|
|
|
| +#include "ash/screensaver/screensaver_view.h"
|
| #include "ash/shell.h"
|
| #include "ash/shell_delegate.h"
|
| #include "ash/shell_window_ids.h"
|
| @@ -11,7 +12,10 @@
|
| #include "ash/shell/panel_window.h"
|
| #include "ash/shell/toplevel_window.h"
|
| #include "ash/wm/shadow_types.h"
|
| +#include "base/bind.h"
|
| +#include "base/time.h"
|
| #include "base/utf_string_conversions.h"
|
| +#include "content/public/browser/browser_thread.h"
|
| #include "ui/aura/root_window.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/gfx/canvas.h"
|
| @@ -216,7 +220,10 @@ WindowTypeLauncher::WindowTypeLauncher()
|
| this, ASCIIToUTF16("Open Views Examples Window")))),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(show_hide_window_button_(
|
| new views::NativeTextButton(
|
| - this, ASCIIToUTF16("Show/Hide a Window")))) {
|
| + this, ASCIIToUTF16("Show/Hide a Window")))),
|
| + ALLOW_THIS_IN_INITIALIZER_LIST(show_screensaver_(
|
| + new views::NativeTextButton(
|
| + this, ASCIIToUTF16("Show the Screensaver [for 5 seconds]")))) {
|
| views::GridLayout* layout = new views::GridLayout(this);
|
| layout->SetInsets(5, 5, 5, 5);
|
| SetLayoutManager(layout);
|
| @@ -239,6 +246,7 @@ WindowTypeLauncher::WindowTypeLauncher()
|
| AddViewToLayout(layout, transient_button_);
|
| AddViewToLayout(layout, examples_button_);
|
| AddViewToLayout(layout, show_hide_window_button_);
|
| + AddViewToLayout(layout, show_screensaver_);
|
| #if !defined(OS_MACOSX)
|
| set_context_menu_controller(this);
|
| #endif
|
| @@ -305,6 +313,13 @@ void WindowTypeLauncher::ButtonPressed(views::Button* sender,
|
| NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView());
|
| } else if (sender == show_hide_window_button_) {
|
| NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView());
|
| + } else if (sender == show_screensaver_) {
|
| + ash::ShowScreensaver(GURL("http://www.google.com"));
|
| + content::BrowserThread::PostDelayedTask(content::BrowserThread::UI,
|
| + FROM_HERE,
|
| + base::Bind(&ash::CloseScreensaver),
|
| + base::TimeDelta::FromSeconds(5));
|
| +
|
| }
|
| #if !defined(OS_MACOSX)
|
| else if (sender == examples_button_) {
|
|
|