summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/shell/shell_browser_main_parts.cc4
-rw-r--r--apps/shell/shell_browser_main_parts.h6
2 files changed, 8 insertions, 2 deletions
diff --git a/apps/shell/shell_browser_main_parts.cc b/apps/shell/shell_browser_main_parts.cc
index e03fdd2..ae442f7 100644
--- a/apps/shell/shell_browser_main_parts.cc
+++ b/apps/shell/shell_browser_main_parts.cc
@@ -131,9 +131,9 @@ void ShellBrowserMainParts::OnRootWindowHostCloseRequested(
}
void ShellBrowserMainParts::CreateRootWindow() {
+ test_screen_.reset(aura::TestScreen::Create());
// TODO(jamescook): Replace this with a real Screen implementation.
- gfx::Screen::SetScreenInstance(
- gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create());
+ gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get());
// Set up basic pieces of views::corewm.
wm_test_helper_.reset(new wm::WMTestHelper(gfx::Size(800, 600)));
// Ensure the X window gets mapped.
diff --git a/apps/shell/shell_browser_main_parts.h b/apps/shell/shell_browser_main_parts.h
index c246c03..2d02cac 100644
--- a/apps/shell/shell_browser_main_parts.h
+++ b/apps/shell/shell_browser_main_parts.h
@@ -11,6 +11,10 @@
#include "content/public/browser/browser_main_parts.h"
#include "ui/aura/root_window_observer.h"
+namespace aura {
+class TestScreen;
+}
+
namespace base {
class FilePath;
}
@@ -80,6 +84,8 @@ class ShellBrowserMainParts : public content::BrowserMainParts,
// Enable a minimal set of views::corewm to be initialized.
scoped_ptr<wm::WMTestHelper> wm_test_helper_;
+ scoped_ptr<aura::TestScreen> test_screen_;
+
// Owned by the BrowserContextKeyedService system.
extensions::ShellExtensionSystem* extension_system_;