From 9ed9ac97bd45365c2cb491b16f9c70ee96b036ff Mon Sep 17 00:00:00 2001 From: "rkc@chromium.org" Date: Fri, 4 May 2012 17:44:37 +0000 Subject: Revert 135369 - Re-implement the screensaver to use WebView instead of ExtensionDialogHost. Use WebView to render the screensaver extension instead of ExtensionDialogHost. Using the RenderViewGone override to detect termination of the renderer process to restart it. Added browser tests. R=ben@chromium.org,sky@chromium.org BUG=chromium-os:28211 TEST=Tested that the screensaver comes up; tested the reload via crashing the extension renderer with SIG_ABRT; also ran browser tests. Review URL: https://chromiumcodereview.appspot.com/10191010 TBR=rkc@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135372 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/shell/shell_delegate_impl.cc | 4 ---- ash/shell/shell_delegate_impl.h | 1 - ash/shell/window_type_launcher.cc | 17 +---------------- ash/shell/window_type_launcher.h | 1 - 4 files changed, 1 insertion(+), 22 deletions(-) (limited to 'ash/shell') diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index 31edb6a..9cafd1e 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -75,10 +75,6 @@ void ShellDelegateImpl::OpenCrosh() { void ShellDelegateImpl::OpenMobileSetup() { } -content::BrowserContext* ShellDelegateImpl::GetCurrentBrowserContext() { - return Shell::GetInstance()->browser_context(); -} - void ShellDelegateImpl::ToggleSpokenFeedback() { } diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index 71b65b2..66f8c36 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -33,7 +33,6 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual void OpenFileManager() OVERRIDE; virtual void OpenCrosh() OVERRIDE; virtual void OpenMobileSetup() OVERRIDE; - virtual content::BrowserContext* GetCurrentBrowserContext() OVERRIDE; virtual void ToggleSpokenFeedback() OVERRIDE; virtual ash::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE; virtual void StartPartialScreenshot( diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc index 020ec00..f3abad2 100644 --- a/ash/shell/window_type_launcher.cc +++ b/ash/shell/window_type_launcher.cc @@ -4,7 +4,6 @@ #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" @@ -12,10 +11,7 @@ #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" @@ -220,10 +216,7 @@ 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")))), - ALLOW_THIS_IN_INITIALIZER_LIST(show_screensaver_( - new views::NativeTextButton( - this, ASCIIToUTF16("Show the Screensaver [for 5 seconds]")))) { + this, ASCIIToUTF16("Show/Hide a Window")))) { views::GridLayout* layout = new views::GridLayout(this); layout->SetInsets(5, 5, 5, 5); SetLayoutManager(layout); @@ -246,7 +239,6 @@ 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 @@ -313,13 +305,6 @@ 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_) { diff --git a/ash/shell/window_type_launcher.h b/ash/shell/window_type_launcher.h index 4dcc5ab..3b9807d 100644 --- a/ash/shell/window_type_launcher.h +++ b/ash/shell/window_type_launcher.h @@ -77,7 +77,6 @@ class WindowTypeLauncher : public views::WidgetDelegateView, views::NativeTextButton* transient_button_; views::NativeTextButton* examples_button_; views::NativeTextButton* show_hide_window_button_; - views::NativeTextButton* show_screensaver_; #if !defined(OS_MACOSX) scoped_ptr menu_runner_; #endif -- cgit v1.1