summaryrefslogtreecommitdiffstats
path: root/ash/shell
diff options
context:
space:
mode:
authorrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 22:11:44 +0000
committerrkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 22:11:44 +0000
commit166ea521da0b6fec159d864171e15f1e74785845 (patch)
treed94043a50d77e100c01298e08cef0419c3071e9b /ash/shell
parent8dee09204160685d7409a0caf525aea59d87a0c6 (diff)
downloadchromium_src-166ea521da0b6fec159d864171e15f1e74785845.zip
chromium_src-166ea521da0b6fec159d864171e15f1e74785845.tar.gz
chromium_src-166ea521da0b6fec159d864171e15f1e74785845.tar.bz2
Revert 135000 - 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 Review URL: https://chromiumcodereview.appspot.com/10335010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r--ash/shell/shell_delegate_impl.cc4
-rw-r--r--ash/shell/shell_delegate_impl.h1
-rw-r--r--ash/shell/window_type_launcher.cc17
-rw-r--r--ash/shell/window_type_launcher.h1
4 files changed, 1 insertions, 22 deletions
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
index 4805957..c2bfdc0 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();
-}
-
ash::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() {
return ash::shell::CreateAppListViewDelegate();
}
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h
index 243cfa4..b3905e0 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 ash::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE;
virtual void StartPartialScreenshot(
ash::ScreenshotDelegate* screenshot_delegate) OVERRIDE;
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<views::MenuRunner> menu_runner_;
#endif