Commit e639d856 authored by eroman@chromium.org's avatar eroman@chromium.org

Revert 132294 - Aura demo fix

BUG=123311
TEST=sadrul@chromium.org


Review URL: http://codereview.chromium.org/10082008

TBR=oshima@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132298 0039d316-1c4b-4281-b951-d872f2087c98
parent d9e7a496
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "ui/aura/env.h" #include "ui/aura/env.h"
#include "ui/aura/monitor_manager.h" #include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/single_monitor_manager.h" #include "ui/aura/test/single_monitor_manager.h"
#include "ui/aura/test/test_screen.h" #include "ui/aura/test/test_screen.h"
#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/test/test_stacking_client.h"
#endif #endif
...@@ -128,7 +128,8 @@ class AccessibilityEventRouterViewsTest ...@@ -128,7 +128,8 @@ class AccessibilityEventRouterViewsTest
virtual void SetUp() { virtual void SetUp() {
views::ViewsDelegate::views_delegate = new AccessibilityViewsDelegate(); views::ViewsDelegate::views_delegate = new AccessibilityViewsDelegate();
#if defined(USE_AURA) #if defined(USE_AURA)
aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); aura::Env::GetInstance()->SetMonitorManager(
new aura::test::SingleMonitorManager);
root_window_.reset( root_window_.reset(
aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); aura::MonitorManager::CreateRootWindowForPrimaryMonitor());
#if defined(USE_ASH) #if defined(USE_ASH)
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "ui/aura/env.h" #include "ui/aura/env.h"
#include "ui/aura/monitor_manager.h" #include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/single_monitor_manager.h" #include "ui/aura/test/single_monitor_manager.h"
#include "ui/aura/test/test_activation_client.h" #include "ui/aura/test/test_activation_client.h"
#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/test/test_stacking_client.h"
#endif #endif
...@@ -49,7 +49,8 @@ void BrowserWithTestWindowTest::SetUp() { ...@@ -49,7 +49,8 @@ void BrowserWithTestWindowTest::SetUp() {
window_.reset(new TestBrowserWindow(browser())); window_.reset(new TestBrowserWindow(browser()));
browser_->SetWindowForTesting(window_.get()); browser_->SetWindowForTesting(window_.get());
#if defined(USE_AURA) #if defined(USE_AURA)
aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); aura::Env::GetInstance()->SetMonitorManager(
new aura::test::SingleMonitorManager);
root_window_.reset(aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); root_window_.reset(aura::MonitorManager::CreateRootWindowForPrimaryMonitor());
#if defined(USE_ASH) #if defined(USE_ASH)
gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get())); gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get()));
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "ui/aura/env.h" #include "ui/aura/env.h"
#include "ui/aura/monitor_manager.h" #include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/single_monitor_manager.h" #include "ui/aura/test/single_monitor_manager.h"
#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/test/test_stacking_client.h"
#endif #endif
...@@ -195,7 +195,8 @@ void RenderViewHostTestHarness::Reload() { ...@@ -195,7 +195,8 @@ void RenderViewHostTestHarness::Reload() {
void RenderViewHostTestHarness::SetUp() { void RenderViewHostTestHarness::SetUp() {
#if defined(USE_AURA) #if defined(USE_AURA)
aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); aura::Env::GetInstance()->SetMonitorManager(
new aura::test::SingleMonitorManager);
root_window_.reset(aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); root_window_.reset(aura::MonitorManager::CreateRootWindowForPrimaryMonitor());
#if defined(USE_ASH) #if defined(USE_ASH)
gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get())); gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get()));
......
...@@ -88,8 +88,6 @@ ...@@ -88,8 +88,6 @@
'root_window_view_mac.mm', 'root_window_view_mac.mm',
'root_window.cc', 'root_window.cc',
'root_window.h', 'root_window.h',
'single_monitor_manager.cc',
'single_monitor_manager.h',
'ui_controls_win.cc', 'ui_controls_win.cc',
'ui_controls_x11.cc', 'ui_controls_x11.cc',
'window.cc', 'window.cc',
...@@ -133,6 +131,8 @@ ...@@ -133,6 +131,8 @@
'test/aura_test_helper.h', 'test/aura_test_helper.h',
'test/event_generator.cc', 'test/event_generator.cc',
'test/event_generator.h', 'test/event_generator.h',
'test/single_monitor_manager.h',
'test/single_monitor_manager.cc',
'test/test_activation_client.cc', 'test/test_activation_client.cc',
'test/test_activation_client.h', 'test/test_activation_client.h',
'test/test_event_filter.cc', 'test/test_event_filter.cc',
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "ui/aura/client/stacking_client.h" #include "ui/aura/client/stacking_client.h"
#include "ui/aura/env.h" #include "ui/aura/env.h"
#include "ui/aura/event.h" #include "ui/aura/event.h"
#include "ui/aura/single_monitor_manager.h" #include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/aura/window_delegate.h" #include "ui/aura/window_delegate.h"
...@@ -111,7 +111,7 @@ int main(int argc, char** argv) { ...@@ -111,7 +111,7 @@ int main(int argc, char** argv) {
// Create the message-loop here before creating the root window. // Create the message-loop here before creating the root window.
MessageLoop message_loop(MessageLoop::TYPE_UI); MessageLoop message_loop(MessageLoop::TYPE_UI);
ui::CompositorTestSupport::Initialize(); ui::CompositorTestSupport::Initialize();
aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager);
scoped_ptr<aura::RootWindow> root_window( scoped_ptr<aura::RootWindow> root_window(
aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); aura::MonitorManager::CreateRootWindowForPrimaryMonitor());
scoped_ptr<DemoStackingClient> stacking_client(new DemoStackingClient( scoped_ptr<DemoStackingClient> stacking_client(new DemoStackingClient(
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "ui/aura/env.h" #include "ui/aura/env.h"
#include "ui/aura/monitor_manager.h" #include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/single_monitor_manager.h" #include "ui/aura/test/single_monitor_manager.h"
#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/test/test_stacking_client.h"
#include "ui/aura/ui_controls_aura.h" #include "ui/aura/ui_controls_aura.h"
#include "ui/base/gestures/gesture_configuration.h" #include "ui/base/gestures/gesture_configuration.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ui/aura/single_monitor_manager.h" #include "ui/aura/test/single_monitor_manager.h"
#include <string> #include <string>
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "ui/gfx/rect.h" #include "ui/gfx/rect.h"
namespace aura { namespace aura {
namespace test {
using std::string; using std::string;
...@@ -98,4 +99,5 @@ void SingleMonitorManager::Update(const gfx::Size size) { ...@@ -98,4 +99,5 @@ void SingleMonitorManager::Update(const gfx::Size size) {
monitor_->set_size(size); monitor_->set_size(size);
} }
} // namespace test
} // namespace aura } // namespace aura
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef UI_AURA_SINGLE_MONITOR_MANAGER_H_ #ifndef UI_AURA_TEST_SINGLE_MONITOR_MANAGER_H_
#define UI_AURA_SINGLE_MONITOR_MANAGER_H_ #define UI_AURA_TEST_SINGLE_MONITOR_MANAGER_H_
#pragma once #pragma once
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
...@@ -16,6 +16,7 @@ class Rect; ...@@ -16,6 +16,7 @@ class Rect;
} }
namespace aura { namespace aura {
namespace test {
// A monitor manager assuming there is one monitor. // A monitor manager assuming there is one monitor.
class SingleMonitorManager : public MonitorManager, class SingleMonitorManager : public MonitorManager,
...@@ -52,6 +53,7 @@ class SingleMonitorManager : public MonitorManager, ...@@ -52,6 +53,7 @@ class SingleMonitorManager : public MonitorManager,
DISALLOW_COPY_AND_ASSIGN(SingleMonitorManager); DISALLOW_COPY_AND_ASSIGN(SingleMonitorManager);
}; };
} // namespace test
} // namespace aura } // namespace aura
#endif // UI_AURA_SINGLE_MONITOR_MANAGER_H_ #endif // UI_AURA_TEST_SINGLE_MONITOR_MANAGER_H_
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "ui/aura/env.h" #include "ui/aura/env.h"
#include "ui/aura/monitor_manager.h" #include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/single_monitor_manager.h" #include "ui/aura/test/single_monitor_manager.h"
#include "ui/aura/test/test_activation_client.h" #include "ui/aura/test/test_activation_client.h"
#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/test/test_stacking_client.h"
#include "ui/base/ime/input_method.h" #include "ui/base/ime/input_method.h"
...@@ -83,7 +83,8 @@ void ViewsTestBase::SetUp() { ...@@ -83,7 +83,8 @@ void ViewsTestBase::SetUp() {
if (!views_delegate_.get()) if (!views_delegate_.get())
views_delegate_.reset(new TestViewsDelegate()); views_delegate_.reset(new TestViewsDelegate());
#if defined(USE_AURA) #if defined(USE_AURA)
aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); aura::Env::GetInstance()->SetMonitorManager(
new aura::test::SingleMonitorManager);
root_window_.reset(aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); root_window_.reset(aura::MonitorManager::CreateRootWindowForPrimaryMonitor());
#if defined(USE_ASH) #if defined(USE_ASH)
gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get())); gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get()));
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "ui/aura/layout_manager.h" #include "ui/aura/layout_manager.h"
#include "ui/aura/monitor_manager.h" #include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/single_monitor_manager.h" #include "ui/aura/test/single_monitor_manager.h"
#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/test/test_stacking_client.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/views/widget/root_view.h" #include "ui/views/widget/root_view.h"
...@@ -40,7 +40,8 @@ class NativeWidgetAuraTest : public testing::Test { ...@@ -40,7 +40,8 @@ class NativeWidgetAuraTest : public testing::Test {
// testing::Test overrides: // testing::Test overrides:
virtual void SetUp() OVERRIDE { virtual void SetUp() OVERRIDE {
aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); aura::Env::GetInstance()->SetMonitorManager(
new aura::test::SingleMonitorManager);
root_window_.reset( root_window_.reset(
aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); aura::MonitorManager::CreateRootWindowForPrimaryMonitor());
#if defined(USE_ASH) #if defined(USE_ASH)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment