summaryrefslogtreecommitdiffstats
path: root/ash/test
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 01:49:17 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 01:49:17 +0000
commit47686c42b6a34d82c12f8f378be8d52d06875404 (patch)
tree68f3cb78f8afb9fae59e221b0ea38e6b16391f3d /ash/test
parent6e415ff81a1e29024ccfdd5548e7cd6ba4de450e (diff)
downloadchromium_src-47686c42b6a34d82c12f8f378be8d52d06875404.zip
chromium_src-47686c42b6a34d82c12f8f378be8d52d06875404.tar.gz
chromium_src-47686c42b6a34d82c12f8f378be8d52d06875404.tar.bz2
Introduces NewWindowDelegate to create or show windows/tabs that are not part of ash.
BUG=none TBR=phajdan.jr@chromium.org Review URL: https://codereview.chromium.org/30533012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r--ash/test/test_shell_delegate.cc43
-rw-r--r--ash/test/test_shell_delegate.h9
2 files changed, 20 insertions, 32 deletions
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc
index d7c11bd..f2b3722 100644
--- a/ash/test/test_shell_delegate.cc
+++ b/ash/test/test_shell_delegate.cc
@@ -10,6 +10,7 @@
#include "ash/default_accessibility_delegate.h"
#include "ash/host/root_window_host_factory.h"
#include "ash/keyboard_controller_proxy_stub.h"
+#include "ash/new_window_delegate.h"
#include "ash/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
@@ -26,6 +27,20 @@
namespace ash {
namespace test {
+namespace {
+
+class NewWindowDelegateImpl : public NewWindowDelegate {
+ virtual void NewTab() OVERRIDE {}
+ virtual void NewWindow(bool incognito) OVERRIDE {}
+ virtual void OpenFileManager() OVERRIDE {}
+ virtual void OpenCrosh() OVERRIDE {}
+ virtual void RestoreTab() OVERRIDE {}
+ virtual void ShowKeyboardOverlay() OVERRIDE {}
+ virtual void ShowTaskManager() OVERRIDE {}
+ virtual void OpenFeedbackPage() OVERRIDE {}
+};
+
+} // namespace
TestShellDelegate::TestShellDelegate()
: num_exit_requests_(0),
@@ -58,35 +73,14 @@ void TestShellDelegate::Exit() {
num_exit_requests_++;
}
-void TestShellDelegate::NewTab() {
-}
-
-void TestShellDelegate::NewWindow(bool incognito) {
-}
-
void TestShellDelegate::ToggleFullscreen() {
}
-void TestShellDelegate::OpenFileManager() {
-}
-
-void TestShellDelegate::OpenCrosh() {
-}
-
-void TestShellDelegate::RestoreTab() {
-}
-
-void TestShellDelegate::ShowKeyboardOverlay() {
-}
-
keyboard::KeyboardControllerProxy*
TestShellDelegate::CreateKeyboardControllerProxy() {
return new KeyboardControllerProxyStub();
}
-void TestShellDelegate::ShowTaskManager() {
-}
-
content::BrowserContext* TestShellDelegate::GetCurrentBrowserContext() {
current_browser_context_.reset(new content::TestBrowserContext());
return current_browser_context_.get();
@@ -123,11 +117,12 @@ AccessibilityDelegate* TestShellDelegate::CreateAccessibilityDelegate() {
return new internal::DefaultAccessibilityDelegate();
}
-aura::client::UserActionClient* TestShellDelegate::CreateUserActionClient() {
- return NULL;
+NewWindowDelegate* TestShellDelegate::CreateNewWindowDelegate() {
+ return new NewWindowDelegateImpl;
}
-void TestShellDelegate::OpenFeedbackPage() {
+aura::client::UserActionClient* TestShellDelegate::CreateUserActionClient() {
+ return NULL;
}
void TestShellDelegate::RecordUserMetricsAction(UserMetricsAction action) {
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h
index 8c4269d..5e854ee 100644
--- a/ash/test/test_shell_delegate.h
+++ b/ash/test/test_shell_delegate.h
@@ -36,16 +36,9 @@ class TestShellDelegate : public ShellDelegate {
virtual void PreInit() OVERRIDE;
virtual void Shutdown() OVERRIDE;
virtual void Exit() OVERRIDE;
- virtual void NewTab() OVERRIDE;
- virtual void NewWindow(bool incognito) OVERRIDE;
virtual void ToggleFullscreen() OVERRIDE;
- virtual void OpenFileManager() OVERRIDE;
- virtual void OpenCrosh() OVERRIDE;
- virtual void RestoreTab() OVERRIDE;
- virtual void ShowKeyboardOverlay() OVERRIDE;
virtual keyboard::KeyboardControllerProxy*
CreateKeyboardControllerProxy() OVERRIDE;
- virtual void ShowTaskManager() OVERRIDE;
virtual content::BrowserContext* GetCurrentBrowserContext() OVERRIDE;
virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE;
virtual LauncherDelegate* CreateLauncherDelegate(
@@ -55,8 +48,8 @@ class TestShellDelegate : public ShellDelegate {
virtual CapsLockDelegate* CreateCapsLockDelegate() OVERRIDE;
virtual SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE;
virtual AccessibilityDelegate* CreateAccessibilityDelegate() OVERRIDE;
+ virtual NewWindowDelegate* CreateNewWindowDelegate() OVERRIDE;
virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
- virtual void OpenFeedbackPage() OVERRIDE;
virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE;
virtual void HandleMediaNextTrack() OVERRIDE;
virtual void HandleMediaPlayPause() OVERRIDE;