summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-26 15:33:35 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-26 15:33:35 +0000
commit4cc33f40fde0c1c537863321fa6fde6aa2629843 (patch)
tree49a4c1e4b9b8139634530af085e544e1d003ebe5
parent14be8a2901fd1ef01b2d886fdc67b46dfad95a8f (diff)
downloadchromium_src-4cc33f40fde0c1c537863321fa6fde6aa2629843.zip
chromium_src-4cc33f40fde0c1c537863321fa6fde6aa2629843.tar.gz
chromium_src-4cc33f40fde0c1c537863321fa6fde6aa2629843.tar.bz2
Revert 259580 "Move wm/public into wm target"
> Move wm/public into wm target > > TBR=sky@chromium.org > http://crbug/com/308710 > > Review URL: https://codereview.chromium.org/209383003 TBR=ben@chromium.org Review URL: https://codereview.chromium.org/213033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259589 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/ash.gyp4
-rw-r--r--chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc12
-rw-r--r--chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc25
-rw-r--r--chrome/chrome_browser_ui.gypi2
-rw-r--r--chrome/chrome_tests_unit.gypi2
-rw-r--r--chrome/test/base/browser_with_test_window_test.cc11
-rw-r--r--chrome/test/base/browser_with_test_window_test.h8
-rw-r--r--chrome/test/base/view_event_test_base.cc13
-rw-r--r--chrome/test/base/view_event_test_base.h9
-rw-r--r--content/DEPS1
-rw-r--r--content/browser/media/capture/desktop_capture_device_aura_unittest.cc6
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura_unittest.cc20
-rw-r--r--content/content_browser.gypi1
-rw-r--r--content/content_shell.gypi3
-rw-r--r--content/content_tests.gypi1
-rw-r--r--content/public/test/test_renderer_host.cc11
-rw-r--r--content/public/test/test_renderer_host.h12
-rw-r--r--content/shell/DEPS1
-rw-r--r--content/shell/browser/shell_platform_data_aura.cc2
-rw-r--r--content/shell/browser/shell_views.cc2
-rw-r--r--mojo/examples/launcher/DEPS1
-rw-r--r--mojo/examples/launcher/launcher.cc2
-rw-r--r--mojo/mojo_examples.gypi1
-rw-r--r--ui/app_list/app_list.gyp2
-rw-r--r--ui/aura/aura.gyp28
-rw-r--r--ui/aura/client/default_activation_client.cc (renamed from ui/wm/core/default_activation_client.cc)2
-rw-r--r--ui/aura/client/default_activation_client.h (renamed from ui/wm/core/default_activation_client.h)12
-rw-r--r--ui/aura/test/aura_test_helper.cc9
-rw-r--r--ui/aura/test/aura_test_helper.h11
-rw-r--r--ui/keyboard/keyboard.gyp3
-rw-r--r--ui/keyboard/keyboard_controller_unittest.cc12
-rw-r--r--ui/message_center/message_center.gyp3
-rw-r--r--ui/snapshot/DEPS1
-rw-r--r--ui/snapshot/snapshot_aura_unittest.cc7
-rw-r--r--ui/views/test/DEPS1
-rw-r--r--ui/views/test/views_test_base.cc15
-rw-r--r--ui/views/test/views_test_base.h7
-rw-r--r--ui/views/views.gyp7
-rw-r--r--ui/wm/core/base_focus_rules.h2
-rw-r--r--ui/wm/core/capture_controller.h6
-rw-r--r--ui/wm/core/compound_event_filter.h4
-rw-r--r--ui/wm/core/cursor_manager.h6
-rw-r--r--ui/wm/core/easy_resize_window_targeter.h4
-rw-r--r--ui/wm/core/focus_controller.h4
-rw-r--r--ui/wm/core/focus_rules.h4
-rw-r--r--ui/wm/core/image_grid.h6
-rw-r--r--ui/wm/core/input_method_event_filter.h4
-rw-r--r--ui/wm/core/masked_window_targeter.h4
-rw-r--r--ui/wm/core/native_cursor_manager.h4
-rw-r--r--ui/wm/core/native_cursor_manager_delegate.h4
-rw-r--r--ui/wm/core/shadow.h4
-rw-r--r--ui/wm/core/shadow_controller.h6
-rw-r--r--ui/wm/core/shadow_types.h6
-rw-r--r--ui/wm/core/transient_window_controller.h4
-rw-r--r--ui/wm/core/transient_window_manager.h4
-rw-r--r--ui/wm/core/transient_window_observer.h4
-rw-r--r--ui/wm/core/transient_window_stacking_client.h4
-rw-r--r--ui/wm/core/visibility_controller.h8
-rw-r--r--ui/wm/core/window_animations.cc2
-rw-r--r--ui/wm/core/window_animations.h29
-rw-r--r--ui/wm/core/window_modality_controller.h12
-rw-r--r--ui/wm/core/window_util.h32
-rw-r--r--ui/wm/core/wm_core_export.h32
-rw-r--r--ui/wm/core/wm_core_switches.h4
-rw-r--r--ui/wm/core/wm_state.h4
-rw-r--r--ui/wm/public/activation_change_observer.h9
-rw-r--r--ui/wm/public/activation_client.cc2
-rw-r--r--ui/wm/public/activation_client.h14
-rw-r--r--ui/wm/public/activation_delegate.h10
-rw-r--r--ui/wm/public/animation_host.h9
-rw-r--r--ui/wm/public/dispatcher_client.h10
-rw-r--r--ui/wm/public/drag_drop_client.h9
-rw-r--r--ui/wm/public/drag_drop_delegate.h9
-rw-r--r--ui/wm/public/scoped_tooltip_disabler.h3
-rw-r--r--ui/wm/public/tooltip_client.h13
-rw-r--r--ui/wm/public/transient_window_client.h8
-rw-r--r--ui/wm/public/window_move_client.h9
-rw-r--r--ui/wm/test/wm_test_helper.cc50
-rw-r--r--ui/wm/test/wm_test_helper.h33
-rw-r--r--ui/wm/wm.gyp46
-rw-r--r--ui/wm/wm_export.h32
81 files changed, 401 insertions, 342 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp
index a96cbc6..0fc17cb 100644
--- a/ash/ash.gyp
+++ b/ash/ash.gyp
@@ -39,7 +39,7 @@
'../ui/views/controls/webview/webview.gyp:webview',
'../ui/views/views.gyp:views',
'../ui/web_dialogs/web_dialogs.gyp:web_dialogs',
- '../ui/wm/wm.gyp:wm',
+ '../ui/wm/wm.gyp:wm_core',
'../url/url.gyp:url_lib',
'ash_strings.gyp:ash_strings',
'ash_resources',
@@ -852,7 +852,7 @@
'../ui/views/views.gyp:views',
'../ui/views/views.gyp:views_test_support',
'../ui/web_dialogs/web_dialogs.gyp:web_dialogs_test_support',
- '../ui/wm/wm.gyp:wm',
+ '../ui/wm/wm.gyp:wm_core',
'../url/url.gyp:url_lib',
'ash_strings.gyp:ash_strings',
'ash',
diff --git a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
index c9e472d..3c4ffbf 100644
--- a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
@@ -32,9 +32,9 @@
#endif
#if defined(USE_AURA)
+#include "ui/aura/test/aura_test_helper.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/test/context_factories_for_test.h"
-#include "ui/wm/test/wm_test_helper.h"
#endif
using base::ASCIIToUTF16;
@@ -111,8 +111,8 @@ class AccessibilityEventRouterViewsTest
bool enable_pixel_output = false;
ui::InitializeContextFactoryForTests(enable_pixel_output);
- wm_test_helper_.reset(new wm::WMTestHelper);
- wm_test_helper_->SetUp();
+ aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
+ aura_test_helper_->SetUp();
#endif // USE_AURA
EnableAccessibilityAndListenToFocusNotifications();
}
@@ -120,7 +120,7 @@ class AccessibilityEventRouterViewsTest
virtual void TearDown() {
ClearCallback();
#if defined(USE_AURA)
- wm_test_helper_->TearDown();
+ aura_test_helper_->TearDown();
ui::TerminateContextFactoryForTests();
#endif
delete views::ViewsDelegate::views_delegate;
@@ -139,7 +139,7 @@ class AccessibilityEventRouterViewsTest
views::Widget* CreateWindowWithContents(views::View* contents) {
gfx::NativeView context = NULL;
#if defined(USE_AURA)
- context = wm_test_helper_->root_window();
+ context = aura_test_helper_->root_window();
#endif
views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
new AccessibilityWindowDelegate(contents),
@@ -188,7 +188,7 @@ class AccessibilityEventRouterViewsTest
scoped_ptr<ui::ScopedOleInitializer> ole_initializer_;
#endif
#if defined(USE_AURA)
- scoped_ptr<wm::WMTestHelper> wm_test_helper_;
+ scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
#endif
};
diff --git a/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc b/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
index 571e920..3d8879d 100644
--- a/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
+++ b/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
@@ -5,14 +5,13 @@
#include "chrome/browser/ui/views/apps/shaped_app_window_targeter.h"
#include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
+#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/window.h"
-#include "ui/aura/window_tree_host.h"
-#include "ui/events/event_processor.h"
+#include "ui/aura/window_event_dispatcher.h"
#include "ui/views/controls/webview/webview.h"
-#include "ui/views/test/views_test_base.h"
#include "ui/wm/core/easy_resize_window_targeter.h"
-class ShapedAppWindowTargeterTest : public views::ViewsTestBase {
+class ShapedAppWindowTargeterTest : public aura::test::AuraTestBase {
public:
ShapedAppWindowTargeterTest()
: web_view_(NULL) {
@@ -27,12 +26,12 @@ class ShapedAppWindowTargeterTest : public views::ViewsTestBase {
protected:
virtual void SetUp() OVERRIDE {
- views::ViewsTestBase::SetUp();
+ aura::test::AuraTestBase::SetUp();
widget_.reset(new views::Widget);
views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
params.remove_standard_frame = true;
params.bounds = gfx::Rect(30, 30, 100, 100);
- params.context = host()->window();
+ params.context = root_window();
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
widget_->Init(params);
@@ -44,7 +43,7 @@ class ShapedAppWindowTargeterTest : public views::ViewsTestBase {
virtual void TearDown() OVERRIDE {
widget_.reset();
- views::ViewsTestBase::TearDown();
+ aura::test::AuraTestBase::TearDown();
}
private:
@@ -82,7 +81,7 @@ TEST_F(ShapedAppWindowTargeterTest, HitTestBasic) {
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
- EXPECT_EQ(host()->window(), move.target());
+ EXPECT_EQ(root_window(), move.target());
// But events within the shape will still reach the window.
ui::MouseEvent move2(ui::ET_MOUSE_MOVED,
@@ -99,8 +98,8 @@ TEST_F(ShapedAppWindowTargeterTest, HitTestOnlyForShapedWindow) {
// receive events outside of its bounds. Verify that this window-targeter is
// active unless the window has a custom shape.
gfx::Insets inset(-30, -30, -30, -30);
- host()->window()->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
- new wm::EasyResizeWindowTargeter(host()->window(), inset, inset)));
+ root_window()->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
+ new wm::EasyResizeWindowTargeter(root_window(), inset, inset)));
aura::Window* window = widget()->GetNativeWindow();
{
@@ -140,7 +139,7 @@ TEST_F(ShapedAppWindowTargeterTest, HitTestOnlyForShapedWindow) {
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
- EXPECT_EQ(host()->window(), move.target());
+ EXPECT_EQ(root_window(), move.target());
}
// Remove the custom shape. This should restore the behaviour of targeting the
@@ -202,13 +201,13 @@ TEST_F(ShapedAppWindowTargeterTest, ResizeInsetsWithinBounds) {
{
// With an EasyResizeTargeter on the container, an event
// inside the window and within 5px of an edge should have
- // host()->window() as its target.
+ // root_window() as its target.
ui::MouseEvent move(ui::ET_MOUSE_MOVED,
gfx::Point(32, 37), gfx::Point(32, 37),
ui::EF_NONE, ui::EF_NONE);
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&move);
ASSERT_FALSE(details.dispatcher_destroyed);
- EXPECT_EQ(host()->window(), move.target());
+ EXPECT_EQ(root_window(), move.target());
}
}
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index dcb95c1..7f112b8 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -2821,7 +2821,7 @@
}],
['toolkit_views == 1', {
'dependencies': [
- '../ui/wm/wm.gyp:wm',
+ '../ui/wm/wm.gyp:wm_core',
],
'sources!': [
'browser/ui/profile_reset_bubble_stub.cc',
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index 781687f..46ffe8a 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -2148,7 +2148,7 @@
['use_aura==1 or toolkit_views==1', {
'dependencies': [
'../ui/events/events.gyp:events_test_support',
- '../ui/wm/wm.gyp:wm',
+ '../ui/wm/wm.gyp:wm_core',
],
}],
['use_aura==1 and component=="shared_library"', {
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index e97200a..47d682b 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -18,8 +18,8 @@
#include "content/public/test/test_renderer_host.h"
#if defined(USE_AURA)
+#include "ui/aura/test/aura_test_helper.h"
#include "ui/compositor/test/context_factories_for_test.h"
-#include "ui/wm/test/wm_test_helper.h"
#endif
#if defined(USE_ASH)
@@ -57,7 +57,7 @@ void BrowserWithTestWindowTest::SetUp() {
testing::Test::SetUp();
#if defined(OS_CHROMEOS)
// TODO(jamescook): Windows Ash support. This will require refactoring
- // AshTestHelper and WMTestHelper so they can be used at the same time,
+ // AshTestHelper and AuraTestHelper so they can be used at the same time,
// perhaps by AshTestHelper owning an AuraTestHelper.
ash_test_helper_.reset(new ash::test::AshTestHelper(
base::MessageLoopForUI::current()));
@@ -67,8 +67,9 @@ void BrowserWithTestWindowTest::SetUp() {
bool enable_pixel_output = false;
ui::InitializeContextFactoryForTests(enable_pixel_output);
- wm_test_helper_.reset(new wm::WMTestHelper);
- wm_test_helper_->SetUp();
+ aura_test_helper_.reset(new aura::test::AuraTestHelper(
+ base::MessageLoopForUI::current()));
+ aura_test_helper_->SetUp();
#endif // USE_AURA
#if defined(TOOLKIT_VIEWS)
views_delegate_.reset(CreateViewsDelegate());
@@ -98,7 +99,7 @@ void BrowserWithTestWindowTest::TearDown() {
#if defined(OS_CHROMEOS)
ash_test_helper_->TearDown();
#elif defined(USE_AURA)
- wm_test_helper_->TearDown();
+ aura_test_helper_->TearDown();
ui::TerminateContextFactoryForTests();
#endif
testing::Test::TearDown();
diff --git a/chrome/test/base/browser_with_test_window_test.h b/chrome/test/base/browser_with_test_window_test.h
index cf16b88..4c832f4 100644
--- a/chrome/test/base/browser_with_test_window_test.h
+++ b/chrome/test/base/browser_with_test_window_test.h
@@ -36,8 +36,10 @@ class AshTestHelper;
#endif
#if defined(USE_AURA)
-namespace wm {
-class WMTestHelper;
+namespace aura {
+namespace test {
+class AuraTestHelper;
+}
}
#endif
@@ -187,7 +189,7 @@ class BrowserWithTestWindowTest : public testing::Test {
scoped_ptr<ash::test::AshTestHelper> ash_test_helper_;
#endif
#if defined(USE_AURA)
- scoped_ptr<wm::WMTestHelper> wm_test_helper_;
+ scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
#endif
#if defined(TOOLKIT_VIEWS)
diff --git a/chrome/test/base/view_event_test_base.cc b/chrome/test/base/view_event_test_base.cc
index 07de6f1..faf6fe4 100644
--- a/chrome/test/base/view_event_test_base.cc
+++ b/chrome/test/base/view_event_test_base.cc
@@ -29,11 +29,11 @@
#if defined(USE_AURA)
#include "ui/aura/client/event_client.h"
#include "ui/aura/env.h"
+#include "ui/aura/test/aura_test_helper.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_tree_host.h"
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/wm/core/wm_state.h"
-#include "ui/wm/test/wm_test_helper.h"
#endif
#if defined(OS_CHROMEOS)
@@ -141,11 +141,12 @@ void ViewEventTestBase::SetUp() {
#endif // !OS_WIN
aura::Env::CreateInstance();
#elif defined(USE_AURA)
- // Instead of using the ash shell, use an WMTestHelper to create and manage
+ // Instead of using the ash shell, use an AuraTestHelper to create and manage
// the test screen.
- wm_test_helper_.reset(new wm::WMTestHelper);
- wm_test_helper_->SetUp();
- context = wm_test_helper_->root_window();
+ aura_test_helper_.reset(
+ new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
+ aura_test_helper_->SetUp();
+ context = aura_test_helper_->root_window();
#endif // !USE_ASH && USE_AURA
window_ = views::Widget::CreateWindowWithContext(this, context);
@@ -174,7 +175,7 @@ void ViewEventTestBase::TearDown() {
#endif // !OS_WIN
aura::Env::DeleteInstance();
#elif defined(USE_AURA)
- wm_test_helper_->TearDown();
+ aura_test_helper_->TearDown();
#endif // !USE_ASH && USE_AURA
#if defined(USE_AURA)
diff --git a/chrome/test/base/view_event_test_base.h b/chrome/test/base/view_event_test_base.h
index 34a56c1..302409d 100644
--- a/chrome/test/base/view_event_test_base.h
+++ b/chrome/test/base/view_event_test_base.h
@@ -24,13 +24,18 @@
#include "ui/base/win/scoped_ole_initializer.h"
#endif
+namespace aura {
+namespace test {
+class AuraTestHelper;
+}
+}
+
namespace gfx {
class Size;
}
namespace wm {
class WMState;
-class WMTestHelper;
}
// Base class for Views based tests that dispatch events.
@@ -150,7 +155,7 @@ class ViewEventTestBase : public views::WidgetDelegate,
#endif
#if defined(USE_AURA)
- scoped_ptr<wm::WMTestHelper> wm_test_helper_;
+ scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
scoped_ptr<wm::WMState> wm_state_;
#endif
diff --git a/content/DEPS b/content/DEPS
index 94b8d01..01732b9 100644
--- a/content/DEPS
+++ b/content/DEPS
@@ -90,7 +90,6 @@ include_rules = [
"+ui/snapshot",
"+ui/surface",
"+ui/wm/public",
- "+ui/wm/test",
# Content knows about grd files, but the specifics of how to get a resource
# given its id is left to the embedder.
"-ui/base/l10n",
diff --git a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
index 6502339..99577d6 100644
--- a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
@@ -11,10 +11,10 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/client/window_tree_client.h"
+#include "ui/aura/test/aura_test_helper.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
#include "ui/compositor/test/context_factories_for_test.h"
-#include "ui/wm/test/wm_test_helper.h"
using ::testing::_;
using ::testing::AnyNumber;
@@ -63,7 +63,7 @@ class DesktopCaptureDeviceAuraTest : public testing::Test {
// The ContextFactory must exist before any Compositors are created.
bool enable_pixel_output = false;
ui::InitializeContextFactoryForTests(enable_pixel_output);
- helper_.reset(new wm::WMTestHelper);
+ helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
helper_->SetUp();
// We need a window to cover desktop area so that DesktopCaptureDeviceAura
@@ -93,7 +93,7 @@ class DesktopCaptureDeviceAuraTest : public testing::Test {
private:
base::MessageLoopForUI message_loop_;
BrowserThreadImpl browser_thread_for_ui_;
- scoped_ptr<wm::WMTestHelper> helper_;
+ scoped_ptr<aura::test::AuraTestHelper> helper_;
scoped_ptr<aura::Window> desktop_window_;
scoped_ptr<aura::test::TestWindowDelegate> window_delegate_;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index aa388cf..0e8f92b 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -33,6 +33,7 @@
#include "ui/aura/client/window_tree_client.h"
#include "ui/aura/env.h"
#include "ui/aura/layout_manager.h"
+#include "ui/aura/test/aura_test_helper.h"
#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_cursor_client.h"
#include "ui/aura/test/test_screen.h"
@@ -46,7 +47,6 @@
#include "ui/compositor/test/in_process_context_factory.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
-#include "ui/wm/test/wm_test_helper.h"
using testing::_;
@@ -205,8 +205,8 @@ class RenderWidgetHostViewAuraTest : public testing::Test {
void SetUpEnvironment() {
ImageTransportFactory::InitializeForUnitTests(
scoped_ptr<ui::ContextFactory>(new ui::InProcessContextFactory));
- wm_test_helper_.reset(new wm::WMTestHelper);
- wm_test_helper_->SetUp();
+ aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
+ aura_test_helper_->SetUp();
browser_context_.reset(new TestBrowserContext);
process_host_ = new MockRenderProcessHost(browser_context_.get());
@@ -219,7 +219,7 @@ class RenderWidgetHostViewAuraTest : public testing::Test {
RenderWidgetHostView::CreateViewForWidget(parent_host_));
parent_view_->InitAsChild(NULL);
aura::client::ParentWindowWithContext(parent_view_->GetNativeView(),
- wm_test_helper_->root_window(),
+ aura_test_helper_->root_window(),
gfx::Rect());
widget_host_ = new RenderWidgetHostImpl(
@@ -241,7 +241,7 @@ class RenderWidgetHostViewAuraTest : public testing::Test {
delete parent_host_;
browser_context_.reset();
- wm_test_helper_->TearDown();
+ aura_test_helper_->TearDown();
message_loop_.DeleteSoon(FROM_HERE, browser_context_.release());
message_loop_.RunUntilIdle();
@@ -255,7 +255,7 @@ class RenderWidgetHostViewAuraTest : public testing::Test {
protected:
base::MessageLoopForUI message_loop_;
BrowserThreadImpl browser_thread_for_ui_;
- scoped_ptr<wm::WMTestHelper> wm_test_helper_;
+ scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
scoped_ptr<BrowserContext> browser_context_;
MockRenderWidgetHostDelegate delegate_;
MockRenderProcessHost* process_host_;
@@ -681,7 +681,7 @@ TEST_F(RenderWidgetHostViewAuraTest, PhysicalBackingSizeWithScale) {
widget_host_->ResetSizeAndRepaintPendingFlags();
sink_->ClearMessages();
- wm_test_helper_->test_screen()->SetDeviceScaleFactor(2.0f);
+ aura_test_helper_->test_screen()->SetDeviceScaleFactor(2.0f);
EXPECT_EQ("200x200", view_->GetPhysicalBackingSize().ToString());
// Extra ScreenInfoChanged message for |parent_view_|.
EXPECT_EQ(1u, sink_->message_count());
@@ -699,7 +699,7 @@ TEST_F(RenderWidgetHostViewAuraTest, PhysicalBackingSizeWithScale) {
widget_host_->ResetSizeAndRepaintPendingFlags();
sink_->ClearMessages();
- wm_test_helper_->test_screen()->SetDeviceScaleFactor(1.0f);
+ aura_test_helper_->test_screen()->SetDeviceScaleFactor(1.0f);
// Extra ScreenInfoChanged message for |parent_view_|.
EXPECT_EQ(1u, sink_->message_count());
EXPECT_EQ("100x100", view_->GetPhysicalBackingSize().ToString());
@@ -894,7 +894,7 @@ scoped_ptr<cc::CompositorFrame> MakeDelegatedFrame(float scale_factor,
// Resizing in fullscreen mode should send the up-to-date screen info.
TEST_F(RenderWidgetHostViewAuraTest, FullscreenResize) {
- aura::Window* root_window = wm_test_helper_->root_window();
+ aura::Window* root_window = aura_test_helper_->root_window();
root_window->SetLayoutManager(new FullscreenLayoutManager(root_window));
view_->InitAsFullscreen(parent_view_);
view_->WasShown();
@@ -933,7 +933,7 @@ TEST_F(RenderWidgetHostViewAuraTest, FullscreenResize) {
// Make sure the corrent screen size is set along in the resize
// request when the screen size has changed.
- wm_test_helper_->test_screen()->SetUIScale(0.5);
+ aura_test_helper_->test_screen()->SetUIScale(0.5);
EXPECT_EQ(1u, sink_->message_count());
{
const IPC::Message* msg = sink_->GetMessageAt(0);
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index ffdec19..c782b87 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -1662,7 +1662,6 @@
'dependencies': [
'../ui/aura/aura.gyp:aura',
'../ui/base/strings/ui_strings.gyp:ui_strings',
- '../ui/wm/wm.gyp:wm',
],
'sources/': [
['exclude', '^browser/renderer_host/gtk_im_context_wrapper.cc'],
diff --git a/content/content_shell.gypi b/content/content_shell.gypi
index d4d129d..9290d49 100644
--- a/content/content_shell.gypi
+++ b/content/content_shell.gypi
@@ -325,7 +325,6 @@
['use_aura==1', {
'dependencies': [
'../ui/aura/aura.gyp:aura',
- '../ui/wm/wm.gyp:wm',
'../ui/base/strings/ui_strings.gyp:ui_strings',
],
'sources/': [
@@ -338,7 +337,7 @@
'../ui/views/controls/webview/webview.gyp:webview',
'../ui/views/views.gyp:views',
'../ui/views/views.gyp:views_test_support',
- '../ui/wm/wm.gyp:wm',
+ '../ui/wm/wm.gyp:wm_core',
],
'sources/': [
['exclude', 'shell/browser/shell_aura.cc'],
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index e0fee51..2568faf 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -277,7 +277,6 @@
'dependencies': [
'../ui/aura/aura.gyp:aura_test_support',
'../ui/resources/ui_resources.gyp:ui_test_pak',
- '../ui/wm/wm.gyp:wm_test_support',
],
}],
['use_aura==1 or OS=="mac"', {
diff --git a/content/public/test/test_renderer_host.cc b/content/public/test/test_renderer_host.cc
index 717f8c8..dc323ca 100644
--- a/content/public/test/test_renderer_host.cc
+++ b/content/public/test/test_renderer_host.cc
@@ -23,8 +23,8 @@
#endif
#if defined(USE_AURA)
+#include "ui/aura/test/aura_test_helper.h"
#include "ui/compositor/test/context_factories_for_test.h"
-#include "ui/wm/test/wm_test_helper.h"
#endif
namespace content {
@@ -131,7 +131,7 @@ WebContents* RenderViewHostTestHarness::CreateTestWebContents() {
DCHECK(ole_initializer_ != NULL);
#endif
#if defined(USE_AURA)
- DCHECK(wm_test_helper_ != NULL);
+ DCHECK(aura_test_helper_ != NULL);
#endif
// This will be deleted when the WebContentsImpl goes away.
@@ -171,8 +171,9 @@ void RenderViewHostTestHarness::SetUp() {
bool enable_pixel_output = false;
ui::InitializeContextFactoryForTests(enable_pixel_output);
- wm_test_helper_.reset(new wm::WMTestHelper);
- wm_test_helper_->SetUp();
+ aura_test_helper_.reset(
+ new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
+ aura_test_helper_->SetUp();
#endif
DCHECK(!browser_context_);
@@ -184,7 +185,7 @@ void RenderViewHostTestHarness::SetUp() {
void RenderViewHostTestHarness::TearDown() {
SetContents(NULL);
#if defined(USE_AURA)
- wm_test_helper_->TearDown();
+ aura_test_helper_->TearDown();
ui::TerminateContextFactoryForTests();
#endif
// Make sure that we flush any messages related to WebContentsImpl destruction
diff --git a/content/public/test/test_renderer_host.h b/content/public/test/test_renderer_host.h
index 700d1f0..5a285ca 100644
--- a/content/public/test/test_renderer_host.h
+++ b/content/public/test/test_renderer_host.h
@@ -14,9 +14,15 @@
#include "testing/gtest/include/gtest/gtest.h"
#if defined(USE_AURA)
-#include "ui/wm/test/wm_test_helper.h"
+#include "ui/aura/test/aura_test_helper.h"
#endif
+namespace aura {
+namespace test {
+class AuraTestHelper;
+}
+}
+
namespace ui {
class ScopedOleInitializer;
}
@@ -171,7 +177,7 @@ class RenderViewHostTestHarness : public testing::Test {
TestBrowserThreadBundle* thread_bundle() { return thread_bundle_.get(); }
#if defined(USE_AURA)
- aura::Window* root_window() { return wm_test_helper_->root_window(); }
+ aura::Window* root_window() { return aura_test_helper_->root_window(); }
#endif
// Replaces the RPH being used.
@@ -188,7 +194,7 @@ class RenderViewHostTestHarness : public testing::Test {
scoped_ptr<ui::ScopedOleInitializer> ole_initializer_;
#endif
#if defined(USE_AURA)
- scoped_ptr<wm::WMTestHelper> wm_test_helper_;
+ scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
#endif
RenderViewHostTestEnabler rvh_test_enabler_;
diff --git a/content/shell/DEPS b/content/shell/DEPS
index e25d813..1d7524c 100644
--- a/content/shell/DEPS
+++ b/content/shell/DEPS
@@ -19,7 +19,6 @@ include_rules = [
# The content_shell for aura must work with the views and aura
"+ui/aura",
"+ui/views",
- "+ui/wm",
"+components/breakpad",
]
diff --git a/content/shell/browser/shell_platform_data_aura.cc b/content/shell/browser/shell_platform_data_aura.cc
index afb44bb..fdbf634 100644
--- a/content/shell/browser/shell_platform_data_aura.cc
+++ b/content/shell/browser/shell_platform_data_aura.cc
@@ -6,6 +6,7 @@
#include "content/shell/browser/shell.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/default_activation_client.h"
#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/env.h"
#include "ui/aura/layout_manager.h"
@@ -17,7 +18,6 @@
#include "ui/base/ime/input_method_delegate.h"
#include "ui/base/ime/input_method_factory.h"
#include "ui/gfx/screen.h"
-#include "ui/wm/core/default_activation_client.h"
namespace content {
diff --git a/content/shell/browser/shell_views.cc b/content/shell/browser/shell_views.cc
index fec16d7..5789cd6 100644
--- a/content/shell/browser/shell_views.cc
+++ b/content/shell/browser/shell_views.cc
@@ -487,7 +487,7 @@ void Shell::PlatformCreateWindow(int width, int height) {
#if defined(OS_CHROMEOS)
window_widget_ = views::Widget::CreateWindowWithContextAndBounds(
new ShellWindowDelegateView(this),
- wm_test_helper_->root_window(),
+ wm_test_helper_->GetDefaultParent(NULL, NULL, gfx::Rect()),
gfx::Rect(0, 0, width, height));
#else
window_widget_ = new views::Widget;
diff --git a/mojo/examples/launcher/DEPS b/mojo/examples/launcher/DEPS
index 270ff3a..6242444 100644
--- a/mojo/examples/launcher/DEPS
+++ b/mojo/examples/launcher/DEPS
@@ -8,6 +8,5 @@ include_rules = [
"+ui/gfx",
"+ui/gl",
"+ui/views",
- "+ui/wm",
"+webkit/common/gpu",
]
diff --git a/mojo/examples/launcher/launcher.cc b/mojo/examples/launcher/launcher.cc
index ad5d9e5..a641c0f 100644
--- a/mojo/examples/launcher/launcher.cc
+++ b/mojo/examples/launcher/launcher.cc
@@ -24,6 +24,7 @@
#include "mojo/public/system/macros.h"
#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/default_activation_client.h"
#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/client/window_tree_client.h"
#include "ui/aura/env.h"
@@ -45,7 +46,6 @@
#include "ui/views/layout/fill_layout.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
-#include "ui/wm/core/default_activation_client.h"
#include "url/gurl.h"
#if defined(WIN32)
diff --git a/mojo/mojo_examples.gypi b/mojo/mojo_examples.gypi
index a6564e3..b39f38a 100644
--- a/mojo/mojo_examples.gypi
+++ b/mojo/mojo_examples.gypi
@@ -253,7 +253,6 @@
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/views/views.gyp:views',
- '../ui/wm/wm.gyp:wm',
'../url/url.gyp:url_lib',
'mojo_aura_demo_support',
'mojo_common_lib',
diff --git a/ui/app_list/app_list.gyp b/ui/app_list/app_list.gyp
index 6872185..324bbaa 100644
--- a/ui/app_list/app_list.gyp
+++ b/ui/app_list/app_list.gyp
@@ -149,7 +149,7 @@
'../events/events.gyp:events',
'../views/controls/webview/webview.gyp:webview',
'../views/views.gyp:views',
- '../wm/wm.gyp:wm',
+ '../wm/wm.gyp:wm_core',
],
}, { # toolkit_views==0
'sources/': [
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index a74ae23..6bf7b2e 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -36,6 +36,8 @@
'client/cursor_client.h',
'client/cursor_client_observer.h',
'client/cursor_client_observer.cc',
+ 'client/default_activation_client.cc',
+ 'client/default_activation_client.h',
'client/default_capture_client.cc',
'client/default_capture_client.h',
'client/event_client.cc',
@@ -90,6 +92,28 @@
'window_tree_host_win.h',
'window_tree_host_x11.cc',
'window_tree_host_x11.h',
+ '../wm/public/activation_change_observer.h',
+ '../wm/public/activation_change_observer.cc',
+ '../wm/public/activation_client.cc',
+ '../wm/public/activation_client.h',
+ '../wm/public/activation_delegate.cc',
+ '../wm/public/activation_delegate.h',
+ '../wm/public/animation_host.cc',
+ '../wm/public/animation_host.h',
+ '../wm/public/dispatcher_client.cc',
+ '../wm/public/dispatcher_client.h',
+ '../wm/public/drag_drop_client.cc',
+ '../wm/public/drag_drop_client.h',
+ '../wm/public/drag_drop_delegate.cc',
+ '../wm/public/drag_drop_delegate.h',
+ '../wm/public/scoped_tooltip_disabler.cc',
+ '../wm/public/scoped_tooltip_disabler.h',
+ '../wm/public/tooltip_client.cc',
+ '../wm/public/tooltip_client.h',
+ '../wm/public/transient_window_client.cc',
+ '../wm/public/transient_window_client.h',
+ '../wm/public/window_move_client.cc',
+ '../wm/public/window_move_client.h',
],
'conditions': [
['use_x11==1', {
@@ -149,12 +173,12 @@
'test/test_focus_client.h',
'test/test_screen.cc',
'test/test_screen.h',
+ 'test/test_window_tree_client.cc',
+ 'test/test_window_tree_client.h',
'test/test_windows.cc',
'test/test_windows.h',
'test/test_window_delegate.cc',
'test/test_window_delegate.h',
- 'test/test_window_tree_client.cc',
- 'test/test_window_tree_client.h',
'test/ui_controls_factory_aura.h',
'test/ui_controls_factory_aurawin.cc',
'test/ui_controls_factory_aurax11.cc',
diff --git a/ui/wm/core/default_activation_client.cc b/ui/aura/client/default_activation_client.cc
index d4a55ee..b11d7bf 100644
--- a/ui/wm/core/default_activation_client.cc
+++ b/ui/aura/client/default_activation_client.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/wm/core/default_activation_client.h"
+#include "ui/aura/client/default_activation_client.h"
#include "ui/aura/window.h"
#include "ui/wm/public/activation_change_observer.h"
diff --git a/ui/wm/core/default_activation_client.h b/ui/aura/client/default_activation_client.h
index 8153068..47e19dbc 100644
--- a/ui/wm/core/default_activation_client.h
+++ b/ui/aura/client/default_activation_client.h
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_WM_CORE_DEFAULT_ACTIVATION_CLIENT_H_
-#define UI_WM_CORE_DEFAULT_ACTIVATION_CLIENT_H_
+#ifndef UI_AURA_CLIENT_DEFAULT_ACTIVATION_CLIENT_H_
+#define UI_AURA_CLIENT_DEFAULT_ACTIVATION_CLIENT_H_
#include <vector>
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/observer_list.h"
+#include "ui/aura/aura_export.h"
#include "ui/aura/window_observer.h"
#include "ui/wm/public/activation_client.h"
-#include "ui/wm/wm_export.h"
namespace aura {
namespace client {
@@ -24,8 +24,8 @@ namespace client {
// Simple ActivationClient implementation for use by tests and other targets
// that just need basic behavior (e.g. activate windows whenever requested,
// restack windows at the top when they're activated, etc.).
-class WM_EXPORT DefaultActivationClient : public client::ActivationClient,
- public WindowObserver {
+class AURA_EXPORT DefaultActivationClient : public client::ActivationClient,
+ public WindowObserver {
public:
explicit DefaultActivationClient(Window* root_window);
virtual ~DefaultActivationClient();
@@ -66,4 +66,4 @@ class WM_EXPORT DefaultActivationClient : public client::ActivationClient,
} // namespace client
} // namespace aura
-#endif // UI_WM_CORE_DEFAULT_ACTIVATION_CLIENT_H_
+#endif // UI_AURA_CLIENT_DEFAULT_ACTIVATION_CLIENT_H_
diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc
index c400647..b300dcf 100644
--- a/ui/aura/test/aura_test_helper.cc
+++ b/ui/aura/test/aura_test_helper.cc
@@ -7,6 +7,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/default_activation_client.h"
#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/env.h"
@@ -32,8 +33,7 @@ namespace aura {
namespace test {
AuraTestHelper::AuraTestHelper(base::MessageLoopForUI* message_loop)
- : default_window_size_(800, 600),
- setup_called_(false),
+ : setup_called_(false),
teardown_called_(false),
owns_host_(false) {
DCHECK(message_loop);
@@ -71,6 +71,8 @@ void AuraTestHelper::SetUp() {
focus_client_.reset(new TestFocusClient);
client::SetFocusClient(root_window(), focus_client_.get());
stacking_client_.reset(new TestWindowTreeClient(root_window()));
+ activation_client_.reset(
+ new client::DefaultActivationClient(root_window()));
capture_client_.reset(new client::DefaultCaptureClient(root_window()));
test_input_method_.reset(new ui::DummyInputMethod);
root_window()->SetProperty(
@@ -79,13 +81,14 @@ void AuraTestHelper::SetUp() {
root_window()->Show();
// Ensure width != height so tests won't confuse them.
- host()->SetBounds(gfx::Rect(default_window_size_));
+ host()->SetBounds(gfx::Rect(800, 600));
}
void AuraTestHelper::TearDown() {
teardown_called_ = true;
test_input_method_.reset();
stacking_client_.reset();
+ activation_client_.reset();
capture_client_.reset();
focus_client_.reset();
client::SetFocusClient(root_window(), NULL);
diff --git a/ui/aura/test/aura_test_helper.h b/ui/aura/test/aura_test_helper.h
index f1d6dd5..f79ca76 100644
--- a/ui/aura/test/aura_test_helper.h
+++ b/ui/aura/test/aura_test_helper.h
@@ -22,6 +22,7 @@ class ScopedAnimationDurationScaleMode;
namespace aura {
class TestScreen;
namespace client {
+class DefaultActivationClient;
class DefaultCaptureClient;
class FocusClient;
}
@@ -34,14 +35,14 @@ class TestWindowTreeClient;
class AuraTestHelper {
public:
explicit AuraTestHelper(base::MessageLoopForUI* message_loop);
- virtual ~AuraTestHelper();
+ ~AuraTestHelper();
// Creates and initializes (shows and sizes) the RootWindow for use in tests.
- virtual void SetUp();
+ void SetUp();
// Clean up objects that are created for tests. This also deletes the Env
// object.
- virtual void TearDown();
+ void TearDown();
// Flushes message loop.
void RunAllPendingInMessageLoop();
@@ -52,9 +53,6 @@ class AuraTestHelper {
TestScreen* test_screen() { return test_screen_.get(); }
- protected:
- gfx::Size default_window_size_;
-
private:
base::MessageLoopForUI* message_loop_;
bool setup_called_;
@@ -62,6 +60,7 @@ class AuraTestHelper {
bool owns_host_;
scoped_ptr<WindowTreeHost> host_;
scoped_ptr<TestWindowTreeClient> stacking_client_;
+ scoped_ptr<client::DefaultActivationClient> activation_client_;
scoped_ptr<client::DefaultCaptureClient> capture_client_;
scoped_ptr<ui::InputMethod> test_input_method_;
scoped_ptr<client::FocusClient> focus_client_;
diff --git a/ui/keyboard/keyboard.gyp b/ui/keyboard/keyboard.gyp
index 2067387..fe359c6 100644
--- a/ui/keyboard/keyboard.gyp
+++ b/ui/keyboard/keyboard.gyp
@@ -48,7 +48,7 @@
'../events/events.gyp:events',
'../gfx/gfx.gyp:gfx',
'../gfx/gfx.gyp:gfx_geometry',
- '../wm/wm.gyp:wm',
+ '../wm/wm.gyp:wm_core',
'keyboard_resources',
],
'defines': [
@@ -91,7 +91,6 @@
'../gfx/gfx.gyp:gfx',
'../gfx/gfx.gyp:gfx_geometry',
'../resources/ui_resources.gyp:ui_test_pak',
- '../wm/wm.gyp:wm_test_support',
'keyboard',
],
'sources': [
diff --git a/ui/keyboard/keyboard_controller_unittest.cc b/ui/keyboard/keyboard_controller_unittest.cc
index c797013..d735883 100644
--- a/ui/keyboard/keyboard_controller_unittest.cc
+++ b/ui/keyboard/keyboard_controller_unittest.cc
@@ -9,6 +9,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/layout_manager.h"
+#include "ui/aura/test/aura_test_helper.h"
#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
@@ -26,7 +27,6 @@
#include "ui/keyboard/keyboard_controller_observer.h"
#include "ui/keyboard/keyboard_controller_proxy.h"
#include "ui/keyboard/keyboard_switches.h"
-#include "ui/wm/test/wm_test_helper.h"
namespace keyboard {
namespace {
@@ -165,8 +165,8 @@ class KeyboardControllerTest : public testing::Test {
bool enable_pixel_output = false;
ui::InitializeContextFactoryForTests(enable_pixel_output);
- wm_test_helper_.reset(new wm::WMTestHelper);
- wm_test_helper_->SetUp();
+ aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
+ aura_test_helper_->SetUp();
ui::SetUpInputMethodFactoryForTesting();
focus_controller_.reset(new TestFocusController(root_window()));
proxy_ = new TestKeyboardControllerProxy();
@@ -176,11 +176,11 @@ class KeyboardControllerTest : public testing::Test {
virtual void TearDown() OVERRIDE {
controller_.reset();
focus_controller_.reset();
- wm_test_helper_->TearDown();
+ aura_test_helper_->TearDown();
ui::TerminateContextFactoryForTests();
}
- aura::Window* root_window() { return wm_test_helper_->root_window(); }
+ aura::Window* root_window() { return aura_test_helper_->root_window(); }
KeyboardControllerProxy* proxy() { return proxy_; }
KeyboardController* controller() { return controller_.get(); }
@@ -202,7 +202,7 @@ class KeyboardControllerTest : public testing::Test {
}
base::MessageLoopForUI message_loop_;
- scoped_ptr<aura::test::AuraTestHelper> wm_test_helper_;
+ scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
scoped_ptr<TestFocusController> focus_controller_;
private:
diff --git a/ui/message_center/message_center.gyp b/ui/message_center/message_center.gyp
index 79fecb9..8fc29a6 100644
--- a/ui/message_center/message_center.gyp
+++ b/ui/message_center/message_center.gyp
@@ -115,10 +115,9 @@
}],
['toolkit_views==1', {
'dependencies': [
- '../compositor/compositor.gyp:compositor',
'../events/events.gyp:events',
'../views/views.gyp:views',
- '../wm/wm.gyp:wm',
+ '../compositor/compositor.gyp:compositor',
],
}, {
'sources/': [
diff --git a/ui/snapshot/DEPS b/ui/snapshot/DEPS
index f6768d1..08ad30c 100644
--- a/ui/snapshot/DEPS
+++ b/ui/snapshot/DEPS
@@ -8,5 +8,4 @@ include_rules = [
"+ui/compositor",
"+ui/gfx",
"+ui/gl",
- "+ui/wm",
]
diff --git a/ui/snapshot/snapshot_aura_unittest.cc b/ui/snapshot/snapshot_aura_unittest.cc
index 55c90c8..b000ad1 100644
--- a/ui/snapshot/snapshot_aura_unittest.cc
+++ b/ui/snapshot/snapshot_aura_unittest.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/test/test_simple_task_runner.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/aura/test/aura_test_helper.h"
#include "ui/aura/test/test_screen.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
@@ -22,7 +23,6 @@
#include "ui/gfx/size_conversions.h"
#include "ui/gfx/transform.h"
#include "ui/gl/gl_implementation.h"
-#include "ui/wm/test/wm_test_helper.h"
namespace ui {
namespace {
@@ -90,7 +90,8 @@ class SnapshotAuraTest : public testing::Test {
bool enable_pixel_output = true;
ui::InitializeContextFactoryForTests(enable_pixel_output);
- helper_.reset(new wm::WMTestHelper);
+ helper_.reset(
+ new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
helper_->SetUp();
}
@@ -171,7 +172,7 @@ class SnapshotAuraTest : public testing::Test {
bool completed_;
};
- scoped_ptr<wm::WMTestHelper> helper_;
+ scoped_ptr<aura::test::AuraTestHelper> helper_;
scoped_ptr<aura::Window> test_window_;
scoped_ptr<TestPaintingWindowDelegate> delegate_;
std::vector<unsigned char> png_representation_;
diff --git a/ui/views/test/DEPS b/ui/views/test/DEPS
index a70c66a..b969a40 100644
--- a/ui/views/test/DEPS
+++ b/ui/views/test/DEPS
@@ -1,4 +1,3 @@
include_rules = [
"+content/public/test",
- "+ui/wm/test",
]
diff --git a/ui/views/test/views_test_base.cc b/ui/views/test/views_test_base.cc
index b433804..4bf036c 100644
--- a/ui/views/test/views_test_base.cc
+++ b/ui/views/test/views_test_base.cc
@@ -13,7 +13,6 @@
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/wm/core/capture_controller.h"
#include "ui/wm/core/wm_state.h"
-#include "ui/wm/test/wm_test_helper.h"
namespace views {
@@ -38,8 +37,8 @@ void ViewsTestBase::SetUp() {
bool enable_pixel_output = false;
ui::InitializeContextFactoryForTests(enable_pixel_output);
- wm_test_helper_.reset(new wm::WMTestHelper);
- wm_test_helper_->SetUp();
+ aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
+ aura_test_helper_->SetUp();
wm_state_.reset(new ::wm::WMState);
ui::InitializeInputMethodForTesting();
}
@@ -54,7 +53,7 @@ void ViewsTestBase::TearDown() {
views_delegate_.reset();
testing::Test::TearDown();
ui::ShutdownInputMethodForTesting();
- wm_test_helper_->TearDown();
+ aura_test_helper_->TearDown();
ui::TerminateContextFactoryForTests();
wm_state_.reset();
CHECK(!wm::ScopedCaptureClient::IsActive());
@@ -68,20 +67,20 @@ void ViewsTestBase::RunPendingMessages() {
Widget::InitParams ViewsTestBase::CreateParams(
Widget::InitParams::Type type) {
Widget::InitParams params(type);
- params.context = host()->window();
+ params.context = aura_test_helper_->root_window();
return params;
}
ui::EventProcessor* ViewsTestBase::event_processor() {
- return wm_test_helper_->host()->event_processor();
+ return aura_test_helper_->event_processor();
}
aura::WindowTreeHost* ViewsTestBase::host() {
- return wm_test_helper_->host();
+ return aura_test_helper_->host();
}
gfx::NativeView ViewsTestBase::GetContext() {
- return wm_test_helper_->host()->window();
+ return aura_test_helper_->root_window();
}
} // namespace views
diff --git a/ui/views/test/views_test_base.h b/ui/views/test/views_test_base.h
index 32dd98c..1e7c8df 100644
--- a/ui/views/test/views_test_base.h
+++ b/ui/views/test/views_test_base.h
@@ -16,6 +16,9 @@
namespace aura {
class WindowTreeHost;
+namespace test {
+class AuraTestHelper;
+}
}
namespace ui {
@@ -24,9 +27,9 @@ class EventProcessor;
namespace wm {
class WMState;
-class WMTestHelper;
}
+
namespace views {
// A base class for views unit test. It creates a message loop necessary
@@ -65,7 +68,7 @@ class ViewsTestBase : public testing::Test {
private:
base::MessageLoopForUI message_loop_;
scoped_ptr<TestViewsDelegate> views_delegate_;
- scoped_ptr<wm::WMTestHelper> wm_test_helper_;
+ scoped_ptr<aura::test::AuraTestHelper> aura_test_helper_;
scoped_ptr<wm::WMState> wm_state_;
bool setup_called_;
bool teardown_called_;
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index a82b014..7295a4a 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -36,7 +36,7 @@
'../gfx/gfx.gyp:gfx_geometry',
'../native_theme/native_theme.gyp:native_theme',
'../resources/ui_resources.gyp:ui_resources',
- '../wm/wm.gyp:wm',
+ '../wm/wm.gyp:wm_core',
],
'export_dependent_settings': [
'../accessibility/accessibility.gyp:ax_gen',
@@ -515,8 +515,7 @@
'../events/events.gyp:events',
'../gfx/gfx.gyp:gfx',
'../gfx/gfx.gyp:gfx_geometry',
- '../wm/wm.gyp:wm',
- '../wm/wm.gyp:wm_test_support',
+ '../wm/wm.gyp:wm_core',
'views',
],
'include_dirs': [
@@ -581,7 +580,7 @@
'../resources/ui_resources.gyp:ui_resources',
'../resources/ui_resources.gyp:ui_test_pak',
'../ui_unittests.gyp:ui_test_support',
- '../wm/wm.gyp:wm',
+ '../wm/wm.gyp:wm_core',
'views',
'views_test_support',
],
diff --git a/ui/wm/core/base_focus_rules.h b/ui/wm/core/base_focus_rules.h
index 07dfb65..7195dad 100644
--- a/ui/wm/core/base_focus_rules.h
+++ b/ui/wm/core/base_focus_rules.h
@@ -13,7 +13,7 @@ namespace wm {
// A set of basic focus and activation rules. Specializations should most likely
// subclass this and call up to these methods rather than reimplementing them.
-class WM_EXPORT BaseFocusRules : public FocusRules {
+class WM_CORE_EXPORT BaseFocusRules : public FocusRules {
protected:
BaseFocusRules();
virtual ~BaseFocusRules();
diff --git a/ui/wm/core/capture_controller.h b/ui/wm/core/capture_controller.h
index d802818..a368b63 100644
--- a/ui/wm/core/capture_controller.h
+++ b/ui/wm/core/capture_controller.h
@@ -11,12 +11,12 @@
#include "base/compiler_specific.h"
#include "ui/aura/client/capture_client.h"
#include "ui/aura/window_observer.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace wm {
// Internal CaptureClient implementation. See ScopedCaptureClient for details.
-class WM_EXPORT CaptureController : public aura::client::CaptureClient {
+class WM_CORE_EXPORT CaptureController : public aura::client::CaptureClient {
public:
// Adds |root| to the list of RootWindows notified when capture changes.
void Attach(aura::Window* root);
@@ -53,7 +53,7 @@ class WM_EXPORT CaptureController : public aura::client::CaptureClient {
// ScopedCaptureClient is responsible for creating a CaptureClient for a
// RootWindow. Specifically it creates a single CaptureController that is shared
// among all ScopedCaptureClients and adds the RootWindow to it.
-class WM_EXPORT ScopedCaptureClient : public aura::WindowObserver {
+class WM_CORE_EXPORT ScopedCaptureClient : public aura::WindowObserver {
public:
explicit ScopedCaptureClient(aura::Window* root);
virtual ~ScopedCaptureClient();
diff --git a/ui/wm/core/compound_event_filter.h b/ui/wm/core/compound_event_filter.h
index ab4fdf8..4b72673 100644
--- a/ui/wm/core/compound_event_filter.h
+++ b/ui/wm/core/compound_event_filter.h
@@ -10,7 +10,7 @@
#include "ui/events/event.h"
#include "ui/events/event_handler.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace aura {
class CursorManager;
@@ -37,7 +37,7 @@ namespace wm {
// consumed by any of those filters. If an event is consumed by a filter, the
// rest of the filter(s) and CompoundEventFilter will not see the consumed
// event.
-class WM_EXPORT CompoundEventFilter : public ui::EventHandler {
+class WM_CORE_EXPORT CompoundEventFilter : public ui::EventHandler {
public:
CompoundEventFilter();
virtual ~CompoundEventFilter();
diff --git a/ui/wm/core/cursor_manager.h b/ui/wm/core/cursor_manager.h
index b8ade87..3640c7e 100644
--- a/ui/wm/core/cursor_manager.h
+++ b/ui/wm/core/cursor_manager.h
@@ -14,7 +14,7 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
#include "ui/wm/core/native_cursor_manager_delegate.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace gfx {
class Display;
@@ -32,8 +32,8 @@ class NativeCursorManager;
// requests to queue any further changes until a later time. It sends changes
// to the NativeCursorManager, which communicates back to us when these changes
// were made through the NativeCursorManagerDelegate interface.
-class WM_EXPORT CursorManager : public aura::client::CursorClient,
- public NativeCursorManagerDelegate {
+class WM_CORE_EXPORT CursorManager : public aura::client::CursorClient,
+ public NativeCursorManagerDelegate {
public:
CursorManager(scoped_ptr<NativeCursorManager> delegate);
virtual ~CursorManager();
diff --git a/ui/wm/core/easy_resize_window_targeter.h b/ui/wm/core/easy_resize_window_targeter.h
index 90b0848..fae6d46 100644
--- a/ui/wm/core/easy_resize_window_targeter.h
+++ b/ui/wm/core/easy_resize_window_targeter.h
@@ -7,13 +7,13 @@
#include "ui/aura/window_targeter.h"
#include "ui/gfx/geometry/insets.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace wm {
// An EventTargeter for a container window that uses a slightly larger
// hit-target region for easier resize.
-class WM_EXPORT EasyResizeWindowTargeter : public aura::WindowTargeter {
+class WM_CORE_EXPORT EasyResizeWindowTargeter : public aura::WindowTargeter {
public:
// |container| window is the owner of this targeter.
EasyResizeWindowTargeter(aura::Window* container,
diff --git a/ui/wm/core/focus_controller.h b/ui/wm/core/focus_controller.h
index de15d71..fecdd2e 100644
--- a/ui/wm/core/focus_controller.h
+++ b/ui/wm/core/focus_controller.h
@@ -12,8 +12,8 @@
#include "ui/aura/client/focus_client.h"
#include "ui/aura/window_observer.h"
#include "ui/events/event_handler.h"
+#include "ui/wm/core/wm_core_export.h"
#include "ui/wm/public/activation_client.h"
-#include "ui/wm/wm_export.h"
namespace wm {
@@ -34,7 +34,7 @@ class FocusRules;
// . Window disposition changes (implemented here in aura::WindowObserver).
// (The FocusController registers itself as an observer of the active and
// focused windows).
-class WM_EXPORT FocusController : public aura::client::ActivationClient,
+class WM_CORE_EXPORT FocusController : public aura::client::ActivationClient,
public aura::client::FocusClient,
public ui::EventHandler,
public aura::WindowObserver {
diff --git a/ui/wm/core/focus_rules.h b/ui/wm/core/focus_rules.h
index cb9a4dd..79ffd74 100644
--- a/ui/wm/core/focus_rules.h
+++ b/ui/wm/core/focus_rules.h
@@ -5,7 +5,7 @@
#ifndef UI_WM_CORE_FOCUS_RULES_H_
#define UI_WM_CORE_FOCUS_RULES_H_
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace aura {
class Window;
@@ -15,7 +15,7 @@ namespace wm {
// Implemented by an object that establishes the rules about what can be
// focused or activated.
-class WM_EXPORT FocusRules {
+class WM_CORE_EXPORT FocusRules {
public:
virtual ~FocusRules() {}
diff --git a/ui/wm/core/image_grid.h b/ui/wm/core/image_grid.h
index bee1e46..49ac642 100644
--- a/ui/wm/core/image_grid.h
+++ b/ui/wm/core/image_grid.h
@@ -12,7 +12,7 @@
#include "ui/compositor/layer_delegate.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace gfx {
class Image;
@@ -56,10 +56,10 @@ namespace wm {
// | xXX|
// ...
//
-class WM_EXPORT ImageGrid {
+class WM_CORE_EXPORT ImageGrid {
public:
// Helper class for use by tests.
- class WM_EXPORT TestAPI {
+ class WM_CORE_EXPORT TestAPI {
public:
TestAPI(ImageGrid* grid) : grid_(grid) {}
diff --git a/ui/wm/core/input_method_event_filter.h b/ui/wm/core/input_method_event_filter.h
index c4033d1..17a6a0e 100644
--- a/ui/wm/core/input_method_event_filter.h
+++ b/ui/wm/core/input_method_event_filter.h
@@ -11,7 +11,7 @@
#include "ui/base/ime/input_method_delegate.h"
#include "ui/events/event_handler.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace ui {
class EventProcessor;
@@ -22,7 +22,7 @@ namespace wm {
// An event filter that forwards a KeyEvent to a system IME, and dispatches a
// TranslatedKeyEvent to the root window as needed.
-class WM_EXPORT InputMethodEventFilter
+class WM_CORE_EXPORT InputMethodEventFilter
: public ui::EventHandler,
public ui::internal::InputMethodDelegate {
public:
diff --git a/ui/wm/core/masked_window_targeter.h b/ui/wm/core/masked_window_targeter.h
index 46cf4d2..846021a 100644
--- a/ui/wm/core/masked_window_targeter.h
+++ b/ui/wm/core/masked_window_targeter.h
@@ -6,7 +6,7 @@
#define UI_WM_CORE_MASKED_WINDOW_TARGETER_H_
#include "ui/aura/window_targeter.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace gfx {
class Path;
@@ -14,7 +14,7 @@ class Path;
namespace wm {
-class WM_EXPORT MaskedWindowTargeter : public aura::WindowTargeter {
+class WM_CORE_EXPORT MaskedWindowTargeter : public aura::WindowTargeter {
public:
explicit MaskedWindowTargeter(aura::Window* masked_window);
virtual ~MaskedWindowTargeter();
diff --git a/ui/wm/core/native_cursor_manager.h b/ui/wm/core/native_cursor_manager.h
index 60f72bd..68c9d46 100644
--- a/ui/wm/core/native_cursor_manager.h
+++ b/ui/wm/core/native_cursor_manager.h
@@ -7,7 +7,7 @@
#include "base/strings/string16.h"
#include "ui/wm/core/native_cursor_manager_delegate.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace gfx {
class Display;
@@ -19,7 +19,7 @@ namespace wm {
// requested changes to cursor state. When requested, implementer should tell
// the CursorManager of any actual state changes performed through the
// delegate.
-class WM_EXPORT NativeCursorManager {
+class WM_CORE_EXPORT NativeCursorManager {
public:
virtual ~NativeCursorManager() {}
diff --git a/ui/wm/core/native_cursor_manager_delegate.h b/ui/wm/core/native_cursor_manager_delegate.h
index 5237221..0571d57 100644
--- a/ui/wm/core/native_cursor_manager_delegate.h
+++ b/ui/wm/core/native_cursor_manager_delegate.h
@@ -7,14 +7,14 @@
#include "ui/base/cursor/cursor.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace wm {
// The non-public interface that CursorManager exposes to its users. This
// gives accessors to all the current state, and mutators to all the current
// state.
-class WM_EXPORT NativeCursorManagerDelegate {
+class WM_CORE_EXPORT NativeCursorManagerDelegate {
public:
virtual ~NativeCursorManagerDelegate() {}
diff --git a/ui/wm/core/shadow.h b/ui/wm/core/shadow.h
index c153ecf1..fa42976 100644
--- a/ui/wm/core/shadow.h
+++ b/ui/wm/core/shadow.h
@@ -9,7 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/gfx/rect.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace ui {
class Layer;
@@ -20,7 +20,7 @@ namespace wm {
class ImageGrid;
// Simple class that draws a drop shadow around content at given bounds.
-class WM_EXPORT Shadow : public ui::ImplicitAnimationObserver {
+class WM_CORE_EXPORT Shadow : public ui::ImplicitAnimationObserver {
public:
enum Style {
// Active windows have more opaque shadows, shifted down to make the window
diff --git a/ui/wm/core/shadow_controller.h b/ui/wm/core/shadow_controller.h
index c846894..47aa743 100644
--- a/ui/wm/core/shadow_controller.h
+++ b/ui/wm/core/shadow_controller.h
@@ -10,8 +10,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "ui/wm/core/wm_core_export.h"
#include "ui/wm/public/activation_change_observer.h"
-#include "ui/wm/wm_export.h"
namespace aura {
class Window;
@@ -31,10 +31,10 @@ class Shadow;
// shadows as needed. ShadowController itself is light weight and per
// ActivationClient. ShadowController delegates to its implementation class,
// which observes all window creation.
-class WM_EXPORT ShadowController :
+class WM_CORE_EXPORT ShadowController :
public aura::client::ActivationChangeObserver {
public:
- class WM_EXPORT TestApi {
+ class WM_CORE_EXPORT TestApi {
public:
explicit TestApi(ShadowController* controller) : controller_(controller) {}
~TestApi() {}
diff --git a/ui/wm/core/shadow_types.h b/ui/wm/core/shadow_types.h
index 1198a43..49c92fd 100644
--- a/ui/wm/core/shadow_types.h
+++ b/ui/wm/core/shadow_types.h
@@ -6,7 +6,7 @@
#define UI_WM_CORE_SHADOW_TYPES_H_
#include "ui/aura/window.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace aura {
class Window;
@@ -22,8 +22,8 @@ enum ShadowType {
SHADOW_TYPE_RECTANGULAR,
};
-WM_EXPORT void SetShadowType(aura::Window* window, ShadowType shadow_type);
-WM_EXPORT ShadowType GetShadowType(aura::Window* window);
+WM_CORE_EXPORT void SetShadowType(aura::Window* window, ShadowType shadow_type);
+WM_CORE_EXPORT ShadowType GetShadowType(aura::Window* window);
// A property key describing the drop shadow that should be displayed under the
// window. If unset, no shadow is displayed.
diff --git a/ui/wm/core/transient_window_controller.h b/ui/wm/core/transient_window_controller.h
index 8638824..125cd28 100644
--- a/ui/wm/core/transient_window_controller.h
+++ b/ui/wm/core/transient_window_controller.h
@@ -5,14 +5,14 @@
#ifndef UI_WM_CORE_TRANSIENT_WINDOW_CONTROLLER_H_
#define UI_WM_CORE_TRANSIENT_WINDOW_CONTROLLER_H_
+#include "ui/wm/core/wm_core_export.h"
#include "ui/wm/public/transient_window_client.h"
-#include "ui/wm/wm_export.h"
namespace wm {
// TransientWindowClient implementation. Uses TransientWindowManager to handle
// tracking transient per window.
-class WM_EXPORT TransientWindowController
+class WM_CORE_EXPORT TransientWindowController
: public aura::client::TransientWindowClient {
public:
TransientWindowController();
diff --git a/ui/wm/core/transient_window_manager.h b/ui/wm/core/transient_window_manager.h
index d247b34..0f84ba3 100644
--- a/ui/wm/core/transient_window_manager.h
+++ b/ui/wm/core/transient_window_manager.h
@@ -9,7 +9,7 @@
#include "base/observer_list.h"
#include "ui/aura/window_observer.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace wm {
@@ -26,7 +26,7 @@ class TransientWindowObserver;
// Transient windows are typically used for popups and menus.
// TODO(sky): when we nuke TransientWindowClient rename this to
// TransientWindowController.
-class WM_EXPORT TransientWindowManager : public aura::WindowObserver {
+class WM_CORE_EXPORT TransientWindowManager : public aura::WindowObserver {
public:
typedef std::vector<aura::Window*> Windows;
diff --git a/ui/wm/core/transient_window_observer.h b/ui/wm/core/transient_window_observer.h
index aff5af5..6a7a2e2 100644
--- a/ui/wm/core/transient_window_observer.h
+++ b/ui/wm/core/transient_window_observer.h
@@ -5,7 +5,7 @@
#ifndef UI_WM_CORE_TRANSIENT_WINDOW_OBSERVER_H_
#define UI_WM_CORE_TRANSIENT_WINDOW_OBSERVER_H_
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace aura {
class Window;
@@ -13,7 +13,7 @@ class Window;
namespace wm {
-class WM_EXPORT TransientWindowObserver {
+class WM_CORE_EXPORT TransientWindowObserver {
public:
// Called when a transient child is added to |window|.
virtual void OnTransientChildAdded(aura::Window* window,
diff --git a/ui/wm/core/transient_window_stacking_client.h b/ui/wm/core/transient_window_stacking_client.h
index 4ab4aea..5641a22 100644
--- a/ui/wm/core/transient_window_stacking_client.h
+++ b/ui/wm/core/transient_window_stacking_client.h
@@ -6,13 +6,13 @@
#define UI_WM_CORE_TRANSIENT_WINDOW_STACKING_CLIENT_H_
#include "ui/aura/client/window_stacking_client.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace wm {
class TransientWindowManager;
-class WM_EXPORT TransientWindowStackingClient
+class WM_CORE_EXPORT TransientWindowStackingClient
: public aura::client::WindowStackingClient {
public:
TransientWindowStackingClient();
diff --git a/ui/wm/core/visibility_controller.h b/ui/wm/core/visibility_controller.h
index 47ae991..912e974 100644
--- a/ui/wm/core/visibility_controller.h
+++ b/ui/wm/core/visibility_controller.h
@@ -8,11 +8,11 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "ui/aura/client/visibility_client.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace wm {
-class WM_EXPORT VisibilityController
+class WM_CORE_EXPORT VisibilityController
: public aura::client::VisibilityClient {
public:
VisibilityController();
@@ -47,7 +47,7 @@ class WM_EXPORT VisibilityController
// // previous state.
// }
//
-class WM_EXPORT SuspendChildWindowVisibilityAnimations {
+class WM_CORE_EXPORT SuspendChildWindowVisibilityAnimations {
public:
// Suspend visibility animations of child windows.
explicit SuspendChildWindowVisibilityAnimations(aura::Window* window);
@@ -66,7 +66,7 @@ class WM_EXPORT SuspendChildWindowVisibilityAnimations {
};
// Tells |window| to animate visibility changes to its children.
-void WM_EXPORT SetChildWindowVisibilityChangesAnimated(
+void WM_CORE_EXPORT SetChildWindowVisibilityChangesAnimated(
aura::Window* window);
} // namespace wm
diff --git a/ui/wm/core/window_animations.cc b/ui/wm/core/window_animations.cc
index 3169627e..c7b9c63 100644
--- a/ui/wm/core/window_animations.cc
+++ b/ui/wm/core/window_animations.cc
@@ -41,7 +41,7 @@ DECLARE_WINDOW_PROPERTY_TYPE(int)
DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationType)
DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationTransition)
DECLARE_WINDOW_PROPERTY_TYPE(float)
-DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(WM_EXPORT, bool)
+DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(WM_CORE_EXPORT, bool)
namespace wm {
namespace {
diff --git a/ui/wm/core/window_animations.h b/ui/wm/core/window_animations.h
index 27c4c67..b2ab4de 100644
--- a/ui/wm/core/window_animations.h
+++ b/ui/wm/core/window_animations.h
@@ -8,7 +8,7 @@
#include <vector>
#include "ui/compositor/scoped_layer_animation_settings.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace aura {
class Window;
@@ -58,26 +58,26 @@ enum WindowVisibilityAnimationTransition {
// These two methods use int for type rather than WindowVisibilityAnimationType
// since downstream libraries can extend the set of animations.
-WM_EXPORT void SetWindowVisibilityAnimationType(aura::Window* window,
- int type);
-WM_EXPORT int GetWindowVisibilityAnimationType(aura::Window* window);
+WM_CORE_EXPORT void SetWindowVisibilityAnimationType(aura::Window* window,
+ int type);
+WM_CORE_EXPORT int GetWindowVisibilityAnimationType(aura::Window* window);
-WM_EXPORT void SetWindowVisibilityAnimationTransition(
+WM_CORE_EXPORT void SetWindowVisibilityAnimationTransition(
aura::Window* window,
WindowVisibilityAnimationTransition transition);
-WM_EXPORT bool HasWindowVisibilityAnimationTransition(
+WM_CORE_EXPORT bool HasWindowVisibilityAnimationTransition(
aura::Window* window,
WindowVisibilityAnimationTransition transition);
-WM_EXPORT void SetWindowVisibilityAnimationDuration(
+WM_CORE_EXPORT void SetWindowVisibilityAnimationDuration(
aura::Window* window,
const base::TimeDelta& duration);
-WM_EXPORT base::TimeDelta GetWindowVisibilityAnimationDuration(
+WM_CORE_EXPORT base::TimeDelta GetWindowVisibilityAnimationDuration(
const aura::Window& window);
-WM_EXPORT void SetWindowVisibilityAnimationVerticalPosition(
+WM_CORE_EXPORT void SetWindowVisibilityAnimationVerticalPosition(
aura::Window* window,
float position);
@@ -86,7 +86,7 @@ class HidingWindowAnimationObserver;
// Use this to ensure that the hiding animation is visible even after
// the window is deleted or deactivated, instead of using
// ui::ScopedLayerAnimationSettings directly.
-class WM_EXPORT ScopedHidingAnimationSettings {
+class WM_CORE_EXPORT ScopedHidingAnimationSettings {
public:
explicit ScopedHidingAnimationSettings(aura::Window* window);
~ScopedHidingAnimationSettings();
@@ -104,14 +104,15 @@ class WM_EXPORT ScopedHidingAnimationSettings {
};
// Returns false if the |window| didn't animate.
-WM_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window,
- bool visible);
-WM_EXPORT bool AnimateWindow(aura::Window* window, WindowAnimationType type);
+WM_CORE_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window,
+ bool visible);
+WM_CORE_EXPORT bool AnimateWindow(aura::Window* window,
+ WindowAnimationType type);
// Returns true if window animations are disabled for |window|. Window
// animations are enabled by default. If |window| is NULL, this just checks
// if the global flag disabling window animations is present.
-WM_EXPORT bool WindowAnimationsDisabled(aura::Window* window);
+WM_CORE_EXPORT bool WindowAnimationsDisabled(aura::Window* window);
} // namespace wm
diff --git a/ui/wm/core/window_modality_controller.h b/ui/wm/core/window_modality_controller.h
index 4d52c21..d098d57 100644
--- a/ui/wm/core/window_modality_controller.h
+++ b/ui/wm/core/window_modality_controller.h
@@ -11,7 +11,7 @@
#include "ui/aura/env_observer.h"
#include "ui/aura/window_observer.h"
#include "ui/events/event_handler.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace ui {
class EventTarget;
@@ -21,18 +21,18 @@ class LocatedEvent;
namespace wm {
// Sets the modal parent for the child.
-WM_EXPORT void SetModalParent(aura::Window* child, aura::Window* parent);
+WM_CORE_EXPORT void SetModalParent(aura::Window* child, aura::Window* parent);
// Returns the modal transient child of |window|, or NULL if |window| does not
// have any modal transient children.
-WM_EXPORT aura::Window* GetModalTransient(aura::Window* window);
+WM_CORE_EXPORT aura::Window* GetModalTransient(aura::Window* window);
// WindowModalityController is an event filter that consumes events sent to
// windows that are the transient parents of window-modal windows. This filter
// must be added to the CompoundEventFilter so that activation works properly.
-class WM_EXPORT WindowModalityController : public ui::EventHandler,
- public aura::EnvObserver,
- public aura::WindowObserver {
+class WM_CORE_EXPORT WindowModalityController : public ui::EventHandler,
+ public aura::EnvObserver,
+ public aura::WindowObserver {
public:
explicit WindowModalityController(ui::EventTarget* event_target);
virtual ~WindowModalityController();
diff --git a/ui/wm/core/window_util.h b/ui/wm/core/window_util.h
index 78f2ffb..81989f9 100644
--- a/ui/wm/core/window_util.h
+++ b/ui/wm/core/window_util.h
@@ -10,7 +10,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace aura {
class Window;
@@ -24,18 +24,18 @@ class LayerTreeOwner;
namespace wm {
-WM_EXPORT void ActivateWindow(aura::Window* window);
-WM_EXPORT void DeactivateWindow(aura::Window* window);
-WM_EXPORT bool IsActiveWindow(aura::Window* window);
-WM_EXPORT bool CanActivateWindow(aura::Window* window);
+WM_CORE_EXPORT void ActivateWindow(aura::Window* window);
+WM_CORE_EXPORT void DeactivateWindow(aura::Window* window);
+WM_CORE_EXPORT bool IsActiveWindow(aura::Window* window);
+WM_CORE_EXPORT bool CanActivateWindow(aura::Window* window);
// Retrieves the activatable window for |window|. The ActivationClient makes
// this determination.
-WM_EXPORT aura::Window* GetActivatableWindow(aura::Window* window);
+WM_CORE_EXPORT aura::Window* GetActivatableWindow(aura::Window* window);
// Retrieves the toplevel window for |window|. The ActivationClient makes this
// determination.
-WM_EXPORT aura::Window* GetToplevelWindow(aura::Window* window);
+WM_CORE_EXPORT aura::Window* GetToplevelWindow(aura::Window* window);
// Returns the existing Layer for |root| (and all its descendants) and creates
// a new layer for |root| and all its descendants. This is intended for
@@ -43,24 +43,26 @@ WM_EXPORT aura::Window* GetToplevelWindow(aura::Window* window);
//
// As a result of this |root| has freshly created layers, meaning the layers
// have not yet been painted to.
-WM_EXPORT scoped_ptr<ui::LayerTreeOwner> RecreateLayers(
+WM_CORE_EXPORT scoped_ptr<ui::LayerTreeOwner> RecreateLayers(
ui::LayerOwner* root);
// Convenience functions that get the TransientWindowManager for the window and
// redirect appropriately. These are preferable to calling functions on
// TransientWindowManager as they handle the appropriate NULL checks.
-WM_EXPORT aura::Window* GetTransientParent(aura::Window* window);
-WM_EXPORT const aura::Window* GetTransientParent(
+WM_CORE_EXPORT aura::Window* GetTransientParent(aura::Window* window);
+WM_CORE_EXPORT const aura::Window* GetTransientParent(
const aura::Window* window);
-WM_EXPORT const std::vector<aura::Window*>& GetTransientChildren(
+WM_CORE_EXPORT const std::vector<aura::Window*>& GetTransientChildren(
const aura::Window* window);
-WM_EXPORT void AddTransientChild(aura::Window* parent, aura::Window* child);
-WM_EXPORT void RemoveTransientChild(aura::Window* parent, aura::Window* child);
+WM_CORE_EXPORT void AddTransientChild(aura::Window* parent,
+ aura::Window* child);
+WM_CORE_EXPORT void RemoveTransientChild(aura::Window* parent,
+ aura::Window* child);
// Returns true if |window| has |ancestor| as a transient ancestor. A transient
// ancestor is found by following the transient parent chain of the window.
-WM_EXPORT bool HasTransientAncestor(const aura::Window* window,
- const aura::Window* ancestor);
+WM_CORE_EXPORT bool HasTransientAncestor(const aura::Window* window,
+ const aura::Window* ancestor);
} // namespace wm
diff --git a/ui/wm/core/wm_core_export.h b/ui/wm/core/wm_core_export.h
new file mode 100644
index 0000000..2056ccc
--- /dev/null
+++ b/ui/wm/core/wm_core_export.h
@@ -0,0 +1,32 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_WM_CORE_WM_CORE_EXPORT_H_
+#define UI_WM_CORE_WM_CORE_EXPORT_H_
+
+// Defines WM_CORE_EXPORT so that functionality implemented by the Views module
+// can be exported to consumers.
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+
+#if defined(WM_CORE_IMPLEMENTATION)
+#define WM_CORE_EXPORT __declspec(dllexport)
+#else
+#define WM_CORE_EXPORT __declspec(dllimport)
+#endif // defined(WM_CORE_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#if defined(WM_CORE_IMPLEMENTATION)
+#define WM_CORE_EXPORT __attribute__((visibility("default")))
+#else
+#define WM_CORE_EXPORT
+#endif
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define WM_CORE_EXPORT
+#endif
+
+#endif // UI_WM_CORE_WM_CORE_EXPORT_H_
diff --git a/ui/wm/core/wm_core_switches.h b/ui/wm/core/wm_core_switches.h
index 05658d6..dd48025 100644
--- a/ui/wm/core/wm_core_switches.h
+++ b/ui/wm/core/wm_core_switches.h
@@ -6,7 +6,7 @@
#define UI_WM_CORE_WM_CORE_SWITCHES_H_
#include "build/build_config.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace wm {
namespace switches {
@@ -16,7 +16,7 @@ namespace switches {
// see chromeos::LoginUtil::GetOffTheRecordCommandLine().)
// Please keep alphabetized.
-WM_EXPORT extern const char kWindowAnimationsDisabled[];
+WM_CORE_EXPORT extern const char kWindowAnimationsDisabled[];
} // namespace switches
} // namespace wm
diff --git a/ui/wm/core/wm_state.h b/ui/wm/core/wm_state.h
index 289c9da..b846f70 100644
--- a/ui/wm/core/wm_state.h
+++ b/ui/wm/core/wm_state.h
@@ -6,7 +6,7 @@
#define UI_WM_CORE_WM_STATE_H_
#include "base/memory/scoped_ptr.h"
-#include "ui/wm/wm_export.h"
+#include "ui/wm/core/wm_core_export.h"
namespace wm {
@@ -14,7 +14,7 @@ class TransientWindowController;
class TransientWindowStackingClient;
// Installs state needed by the window manager.
-class WM_EXPORT WMState {
+class WM_CORE_EXPORT WMState {
public:
WMState();
~WMState();
diff --git a/ui/wm/public/activation_change_observer.h b/ui/wm/public/activation_change_observer.h
index 6a4fe3b..68d5b8a 100644
--- a/ui/wm/public/activation_change_observer.h
+++ b/ui/wm/public/activation_change_observer.h
@@ -5,14 +5,14 @@
#ifndef UI_WM_PUBLIC_ACTIVATION_CHANGE_OBSERVER_H_
#define UI_WM_PUBLIC_ACTIVATION_CHANGE_OBSERVER_H_
-#include "ui/wm/wm_export.h"
+#include "ui/aura/aura_export.h"
namespace aura {
class Window;
namespace client {
-class WM_EXPORT ActivationChangeObserver {
+class AURA_EXPORT ActivationChangeObserver {
public:
// Called when |active| gains focus, or there is no active window
// (|active| is NULL in this case.) |old_active| refers to the
@@ -33,10 +33,11 @@ class WM_EXPORT ActivationChangeObserver {
// Gets/Sets the ActivationChangeObserver for a specific window. This observer
// is notified after the ActivationClient notifies all registered observers.
-WM_EXPORT void SetActivationChangeObserver(
+AURA_EXPORT void SetActivationChangeObserver(
Window* window,
ActivationChangeObserver* observer);
-WM_EXPORT ActivationChangeObserver* GetActivationChangeObserver(Window* window);
+AURA_EXPORT ActivationChangeObserver* GetActivationChangeObserver(
+ Window* window);
} // namespace client
} // namespace aura
diff --git a/ui/wm/public/activation_client.cc b/ui/wm/public/activation_client.cc
index f22ac9c..6a47554 100644
--- a/ui/wm/public/activation_client.cc
+++ b/ui/wm/public/activation_client.cc
@@ -7,7 +7,7 @@
#include "ui/aura/window.h"
#include "ui/aura/window_property.h"
-DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(WM_EXPORT, aura::Window*)
+DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(AURA_EXPORT, aura::Window*)
DECLARE_WINDOW_PROPERTY_TYPE(aura::client::ActivationClient*)
namespace aura {
diff --git a/ui/wm/public/activation_client.h b/ui/wm/public/activation_client.h
index decd26d..fc35131 100644
--- a/ui/wm/public/activation_client.h
+++ b/ui/wm/public/activation_client.h
@@ -5,7 +5,7 @@
#ifndef UI_WM_PUBLIC_ACTIVATION_CLIENT_H_
#define UI_WM_PUBLIC_ACTIVATION_CLIENT_H_
-#include "ui/wm/wm_export.h"
+#include "ui/aura/aura_export.h"
namespace ui {
class Event;
@@ -18,7 +18,7 @@ namespace client {
class ActivationChangeObserver;
// An interface implemented by an object that manages window activation.
-class WM_EXPORT ActivationClient {
+class AURA_EXPORT ActivationClient {
public:
// Adds/Removes ActivationChangeObservers.
virtual void AddObserver(ActivationChangeObserver* observer) = 0;
@@ -57,9 +57,9 @@ class WM_EXPORT ActivationClient {
};
// Sets/Gets the activation client on the root Window.
-WM_EXPORT void SetActivationClient(Window* root_window,
- ActivationClient* client);
-WM_EXPORT ActivationClient* GetActivationClient(Window* root_window);
+AURA_EXPORT void SetActivationClient(Window* root_window,
+ ActivationClient* client);
+AURA_EXPORT ActivationClient* GetActivationClient(Window* root_window);
// Some types of transient window are only visible when active.
// The transient parents of these windows may have visual appearance properties
@@ -68,8 +68,8 @@ WM_EXPORT ActivationClient* GetActivationClient(Window* root_window);
// TODO(beng): currently the UI framework (views) implements the actual
// close-on-deactivate component of this feature but it should be
// possible to implement in the aura client.
-WM_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate);
-WM_EXPORT bool GetHideOnDeactivate(Window* window);
+AURA_EXPORT void SetHideOnDeactivate(Window* window, bool hide_on_deactivate);
+AURA_EXPORT bool GetHideOnDeactivate(Window* window);
} // namespace clients
} // namespace aura
diff --git a/ui/wm/public/activation_delegate.h b/ui/wm/public/activation_delegate.h
index 5fe5d53..3c5b3ae 100644
--- a/ui/wm/public/activation_delegate.h
+++ b/ui/wm/public/activation_delegate.h
@@ -5,7 +5,7 @@
#ifndef UI_WM_PUBLIC_ACTIVATION_DELEGATE_H_
#define UI_WM_PUBLIC_ACTIVATION_DELEGATE_H_
-#include "ui/wm/wm_export.h"
+#include "ui/aura/aura_export.h"
namespace ui {
class Event;
@@ -17,7 +17,7 @@ namespace client {
// An interface implemented by an object that configures and responds to changes
// to a window's activation state.
-class WM_EXPORT ActivationDelegate {
+class AURA_EXPORT ActivationDelegate {
public:
// Returns true if the window should be activated.
virtual bool ShouldActivate() const = 0;
@@ -27,9 +27,9 @@ class WM_EXPORT ActivationDelegate {
};
// Sets/Gets the ActivationDelegate on the Window. No ownership changes.
-WM_EXPORT void SetActivationDelegate(Window* window,
- ActivationDelegate* delegate);
-WM_EXPORT ActivationDelegate* GetActivationDelegate(Window* window);
+AURA_EXPORT void SetActivationDelegate(Window* window,
+ ActivationDelegate* delegate);
+AURA_EXPORT ActivationDelegate* GetActivationDelegate(Window* window);
} // namespace client
} // namespace aura
diff --git a/ui/wm/public/animation_host.h b/ui/wm/public/animation_host.h
index 5352e62..71f9f4d 100644
--- a/ui/wm/public/animation_host.h
+++ b/ui/wm/public/animation_host.h
@@ -6,7 +6,7 @@
#define UI_WM_PUBLIC_ANIMATION_HOST_H_
#include "base/compiler_specific.h"
-#include "ui/wm/wm_export.h"
+#include "ui/aura/aura_export.h"
namespace gfx {
class Vector2d;
@@ -19,7 +19,7 @@ namespace client {
// Interface for top level window host of animation. Communicates additional
// bounds required for animation as well as animation completion for deferring
// window closes on hide.
-class WM_EXPORT AnimationHost {
+class AURA_EXPORT AnimationHost {
public:
// Ensure the host window is at least this large so that transitions have
// sufficient space.
@@ -38,8 +38,9 @@ class WM_EXPORT AnimationHost {
virtual ~AnimationHost() {}
};
-WM_EXPORT void SetAnimationHost(Window* window, AnimationHost* animation_host);
-WM_EXPORT AnimationHost* GetAnimationHost(Window* window);
+AURA_EXPORT void SetAnimationHost(Window* window,
+ AnimationHost* animation_host);
+AURA_EXPORT AnimationHost* GetAnimationHost(Window* window);
} // namespace client
} // namespace aura
diff --git a/ui/wm/public/dispatcher_client.h b/ui/wm/public/dispatcher_client.h
index 03376c5..9fd9c94 100644
--- a/ui/wm/public/dispatcher_client.h
+++ b/ui/wm/public/dispatcher_client.h
@@ -6,23 +6,23 @@
#define UI_WM_PUBLIC_DISPATCHER_CLIENT_H_
#include "base/message_loop/message_pump_dispatcher.h"
-#include "ui/wm/wm_export.h"
+#include "ui/aura/aura_export.h"
namespace aura {
class Window;
namespace client {
// An interface implemented by an object which handles nested dispatchers.
-class WM_EXPORT DispatcherClient {
+class AURA_EXPORT DispatcherClient {
public:
virtual void RunWithDispatcher(base::MessagePumpDispatcher* dispatcher) = 0;
virtual void QuitNestedMessageLoop() = 0;
};
-WM_EXPORT void SetDispatcherClient(Window* root_window,
- DispatcherClient* client);
-WM_EXPORT DispatcherClient* GetDispatcherClient(Window* root_window);
+AURA_EXPORT void SetDispatcherClient(Window* root_window,
+ DispatcherClient* client);
+AURA_EXPORT DispatcherClient* GetDispatcherClient(Window* root_window);
} // namespace client
} // namespace aura
diff --git a/ui/wm/public/drag_drop_client.h b/ui/wm/public/drag_drop_client.h
index d0dcbe2..62a2355 100644
--- a/ui/wm/public/drag_drop_client.h
+++ b/ui/wm/public/drag_drop_client.h
@@ -5,9 +5,9 @@
#ifndef UI_WM_PUBLIC_DRAG_DROP_CLIENT_H_
#define UI_WM_PUBLIC_DRAG_DROP_CLIENT_H_
+#include "ui/aura/aura_export.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/gfx/native_widget_types.h"
-#include "ui/wm/wm_export.h"
namespace gfx {
class Point;
@@ -23,7 +23,7 @@ class Window;
namespace client {
// An interface implemented by an object that controls a drag and drop session.
-class WM_EXPORT DragDropClient {
+class AURA_EXPORT DragDropClient {
public:
virtual ~DragDropClient() {}
@@ -52,8 +52,9 @@ class WM_EXPORT DragDropClient {
virtual bool IsDragDropInProgress() = 0;
};
-WM_EXPORT void SetDragDropClient(Window* root_window, DragDropClient* client);
-WM_EXPORT DragDropClient* GetDragDropClient(Window* root_window);
+AURA_EXPORT void SetDragDropClient(Window* root_window,
+ DragDropClient* client);
+AURA_EXPORT DragDropClient* GetDragDropClient(Window* root_window);
} // namespace client
} // namespace aura
diff --git a/ui/wm/public/drag_drop_delegate.h b/ui/wm/public/drag_drop_delegate.h
index bf52b93..50f6c26 100644
--- a/ui/wm/public/drag_drop_delegate.h
+++ b/ui/wm/public/drag_drop_delegate.h
@@ -5,7 +5,7 @@
#ifndef UI_WM_PUBLIC_DRAG_DROP_DELEGATE_H_
#define UI_WM_PUBLIC_DRAG_DROP_DELEGATE_H_
-#include "ui/wm/wm_export.h"
+#include "ui/aura/aura_export.h"
namespace ui {
class DropTargetEvent;
@@ -16,7 +16,7 @@ class Window;
namespace client {
// Delegate interface for drag and drop actions on aura::Window.
-class WM_EXPORT DragDropDelegate {
+class AURA_EXPORT DragDropDelegate {
public:
// OnDragEntered is invoked when the mouse enters this window during a drag &
// drop session. This is immediately followed by an invocation of
@@ -41,8 +41,9 @@ class WM_EXPORT DragDropDelegate {
virtual ~DragDropDelegate() {}
};
-WM_EXPORT void SetDragDropDelegate(Window* window, DragDropDelegate* delegate);
-WM_EXPORT DragDropDelegate* GetDragDropDelegate(Window* window);
+AURA_EXPORT void SetDragDropDelegate(Window* window,
+ DragDropDelegate* delegate);
+AURA_EXPORT DragDropDelegate* GetDragDropDelegate(Window* window);
} // namespace client
} // namespace aura
diff --git a/ui/wm/public/scoped_tooltip_disabler.h b/ui/wm/public/scoped_tooltip_disabler.h
index 8371c02..0fd3e11 100644
--- a/ui/wm/public/scoped_tooltip_disabler.h
+++ b/ui/wm/public/scoped_tooltip_disabler.h
@@ -6,13 +6,12 @@
#define UI_WM_PUBLIC_SCOPED_TOOLTIP_DISABLER_H_
#include "ui/aura/window_observer.h"
-#include "ui/wm/wm_export.h"
namespace aura {
namespace client {
// Use to temporarily disable tooltips.
-class WM_EXPORT ScopedTooltipDisabler : aura::WindowObserver {
+class AURA_EXPORT ScopedTooltipDisabler : aura::WindowObserver {
public:
// Disables tooltips on |window| (does nothing if |window| is NULL). Tooltips
// are reenabled from the destructor when there are no most outstanding
diff --git a/ui/wm/public/tooltip_client.h b/ui/wm/public/tooltip_client.h
index 477b239..f592b21 100644
--- a/ui/wm/public/tooltip_client.h
+++ b/ui/wm/public/tooltip_client.h
@@ -5,8 +5,8 @@
#ifndef UI_WM_PUBLIC_TOOLTIP_CLIENT_H_
#define UI_WM_PUBLIC_TOOLTIP_CLIENT_H_
+#include "ui/aura/aura_export.h"
#include "ui/gfx/font.h"
-#include "ui/wm/wm_export.h"
namespace aura {
class Window;
@@ -14,7 +14,7 @@ namespace client {
class ScopedTooltipDisabler;
-class WM_EXPORT TooltipClient {
+class AURA_EXPORT TooltipClient {
public:
// Informs the shell tooltip manager of change in tooltip for window |target|.
virtual void UpdateTooltip(Window* target) = 0;
@@ -32,11 +32,12 @@ class WM_EXPORT TooltipClient {
friend class ScopedTooltipDisabler;
};
-WM_EXPORT void SetTooltipClient(Window* root_window, TooltipClient* client);
-WM_EXPORT TooltipClient* GetTooltipClient(Window* root_window);
+AURA_EXPORT void SetTooltipClient(Window* root_window,
+ TooltipClient* client);
+AURA_EXPORT TooltipClient* GetTooltipClient(Window* root_window);
-WM_EXPORT void SetTooltipText(Window* window, base::string16* tooltip_text);
-WM_EXPORT const base::string16 GetTooltipText(Window* window);
+AURA_EXPORT void SetTooltipText(Window* window, base::string16* tooltip_text);
+AURA_EXPORT const base::string16 GetTooltipText(Window* window);
} // namespace client
} // namespace aura
diff --git a/ui/wm/public/transient_window_client.h b/ui/wm/public/transient_window_client.h
index 66aa33f..2086100 100644
--- a/ui/wm/public/transient_window_client.h
+++ b/ui/wm/public/transient_window_client.h
@@ -6,7 +6,7 @@
#define UI_WM_PUBLIC_TRANSIENT_WINDOW_CLIENT_H_
#include "base/basictypes.h"
-#include "ui/wm/wm_export.h"
+#include "ui/aura/aura_export.h"
namespace aura {
@@ -24,7 +24,7 @@ namespace client {
// Transient windows are typically used for popups and menus.
// TODO(sky): nuke this class and replace with calls to TransientWindowManager.
// This is temporary until we start moving to ui/wm.
-class WM_EXPORT TransientWindowClient {
+class AURA_EXPORT TransientWindowClient {
public:
virtual void AddTransientChild(Window* parent, Window* child) = 0;
virtual void RemoveTransientChild(Window* parent, Window* child) = 0;
@@ -38,8 +38,8 @@ class WM_EXPORT TransientWindowClient {
// Sets/gets the TransientWindowClient. This does *not* take ownership of
// |client|. It is assumed the caller will invoke SetTransientWindowClient(NULL)
// before deleting |client|.
-WM_EXPORT void SetTransientWindowClient(TransientWindowClient* client);
-WM_EXPORT TransientWindowClient* GetTransientWindowClient();
+AURA_EXPORT void SetTransientWindowClient(TransientWindowClient* client);
+AURA_EXPORT TransientWindowClient* GetTransientWindowClient();
} // namespace client
} // namespace aura
diff --git a/ui/wm/public/window_move_client.h b/ui/wm/public/window_move_client.h
index d8e5794..b8943d3 100644
--- a/ui/wm/public/window_move_client.h
+++ b/ui/wm/public/window_move_client.h
@@ -5,8 +5,8 @@
#ifndef UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_
#define UI_WM_PUBLIC_WINDOW_MOVE_CLIENT_H_
+#include "ui/aura/aura_export.h"
#include "ui/gfx/vector2d.h"
-#include "ui/wm/wm_export.h"
namespace gfx {
class Point;
@@ -28,7 +28,7 @@ enum WindowMoveSource {
// An interface implemented by an object that manages programatically keyed
// window moving.
-class WM_EXPORT WindowMoveClient {
+class AURA_EXPORT WindowMoveClient {
public:
// Starts a nested message loop for moving the window. |drag_offset| is the
// offset from the window origin to the cursor when the drag was started.
@@ -46,8 +46,9 @@ class WM_EXPORT WindowMoveClient {
};
// Sets/Gets the activation client for the specified window.
-WM_EXPORT void SetWindowMoveClient(Window* window, WindowMoveClient* client);
-WM_EXPORT WindowMoveClient* GetWindowMoveClient(Window* window);
+AURA_EXPORT void SetWindowMoveClient(Window* window,
+ WindowMoveClient* client);
+AURA_EXPORT WindowMoveClient* GetWindowMoveClient(Window* window);
} // namespace client
} // namespace aura
diff --git a/ui/wm/test/wm_test_helper.cc b/ui/wm/test/wm_test_helper.cc
index b47de06..160923c8 100644
--- a/ui/wm/test/wm_test_helper.cc
+++ b/ui/wm/test/wm_test_helper.cc
@@ -4,37 +4,49 @@
#include "ui/wm/test/wm_test_helper.h"
-#include "base/message_loop/message_loop.h"
+#include "ui/aura/client/default_activation_client.h"
+#include "ui/aura/client/default_capture_client.h"
+#include "ui/aura/env.h"
+#include "ui/aura/test/test_focus_client.h"
#include "ui/aura/window.h"
-#include "ui/wm/core/default_activation_client.h"
+#include "ui/wm/core/compound_event_filter.h"
+#include "ui/wm/core/input_method_event_filter.h"
namespace wm {
-WMTestHelper::WMTestHelper(const gfx::Size& default_window_size)
- : aura::test::AuraTestHelper(base::MessageLoopForUI::current()) {
- default_window_size_ = default_window_size;
-}
+WMTestHelper::WMTestHelper(const gfx::Size& default_window_size) {
+ aura::Env::CreateInstance();
+ host_.reset(aura::WindowTreeHost::Create(gfx::Rect(default_window_size)));
+ host_->InitHost();
+ aura::client::SetWindowTreeClient(host_->window(), this);
-WMTestHelper::WMTestHelper()
- : aura::test::AuraTestHelper(base::MessageLoopForUI::current()) {
-}
+ focus_client_.reset(new aura::test::TestFocusClient);
+ aura::client::SetFocusClient(host_->window(), focus_client_.get());
-WMTestHelper::~WMTestHelper() {
-}
+ root_window_event_filter_ = new wm::CompoundEventFilter;
+ // Pass ownership of the filter to the root_window.
+ host_->window()->SetEventFilter(root_window_event_filter_);
-////////////////////////////////////////////////////////////////////////////////
-// WMTestHelper, AuraTestHelper overrides:
+ input_method_filter_.reset(new wm::InputMethodEventFilter(
+ host_->GetAcceleratedWidget()));
+ input_method_filter_->SetInputMethodPropertyInRootWindow(host_->window());
+ root_window_event_filter_->AddHandler(input_method_filter_.get());
-void WMTestHelper::SetUp() {
- aura::test::AuraTestHelper::SetUp();
activation_client_.reset(
- new aura::client::DefaultActivationClient(root_window()));
+ new aura::client::DefaultActivationClient(host_->window()));
+
+ capture_client_.reset(
+ new aura::client::DefaultCaptureClient(host_->window()));
}
-void WMTestHelper::TearDown() {
- activation_client_.reset();
- aura::test::AuraTestHelper::TearDown();
+WMTestHelper::~WMTestHelper() {
+ root_window_event_filter_->RemoveHandler(input_method_filter_.get());
}
+aura::Window* WMTestHelper::GetDefaultParent(aura::Window* context,
+ aura::Window* window,
+ const gfx::Rect& bounds) {
+ return host_->window();
+}
} // namespace wm
diff --git a/ui/wm/test/wm_test_helper.h b/ui/wm/test/wm_test_helper.h
index b63012e..e01486b 100644
--- a/ui/wm/test/wm_test_helper.h
+++ b/ui/wm/test/wm_test_helper.h
@@ -7,35 +7,56 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "ui/aura/test/aura_test_helper.h"
+#include "ui/aura/client/window_tree_client.h"
+#include "ui/aura/window_tree_host.h"
namespace aura {
+class Window;
+class WindowTreeHost;
namespace client {
class DefaultActivationClient;
+class DefaultCaptureClient;
+class FocusClient;
}
}
namespace gfx {
+class Rect;
class Size;
}
namespace wm {
+class CompoundEventFilter;
+class InputMethodEventFilter;
+}
+
+namespace wm {
// Creates a minimal environment for running the shell. We can't pull in all of
// ash here, but we can create attach several of the same things we'd find in
// the ash parts of the code.
-class WMTestHelper : public aura::test::AuraTestHelper {
+class WMTestHelper : public aura::client::WindowTreeClient {
public:
explicit WMTestHelper(const gfx::Size& default_window_size);
- WMTestHelper();
virtual ~WMTestHelper();
- // Overridden from aura::test::AuraTestHelper:
- virtual void SetUp() OVERRIDE;
- virtual void TearDown() OVERRIDE;
+ aura::WindowTreeHost* host() { return host_.get(); }
+
+ // Overridden from client::WindowTreeClient:
+ virtual aura::Window* GetDefaultParent(aura::Window* context,
+ aura::Window* window,
+ const gfx::Rect& bounds) OVERRIDE;
private:
+ scoped_ptr<aura::WindowTreeHost> host_;
+
+ // Owned by the root Window.
+ wm::CompoundEventFilter* root_window_event_filter_;
+
+ scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
+ scoped_ptr<wm::InputMethodEventFilter> input_method_filter_;
scoped_ptr<aura::client::DefaultActivationClient> activation_client_;
+ scoped_ptr<aura::client::FocusClient> focus_client_;
DISALLOW_COPY_AND_ASSIGN(WMTestHelper);
};
diff --git a/ui/wm/wm.gyp b/ui/wm/wm.gyp
index 2b438eb..a1960ec 100644
--- a/ui/wm/wm.gyp
+++ b/ui/wm/wm.gyp
@@ -8,7 +8,19 @@
},
'targets': [
{
- 'target_name': 'wm',
+ 'target_name': 'wm_public',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../../skia/skia.gyp:skia',
+ '../aura/aura.gyp:aura',
+ '../gfx/gfx.gyp:gfx_geometry',
+ ],
+ 'sources': [
+ 'public/window_types.h',
+ ],
+ },
+ {
+ 'target_name': 'wm_core',
'type': '<(component)',
'dependencies': [
'../../base/base.gyp:base',
@@ -23,7 +35,7 @@
'../base/ui_base.gyp:ui_base',
],
'defines': [
- 'WM_IMPLEMENTATION',
+ 'WM_CORE_IMPLEMENTATION',
],
'sources': [
'core/base_focus_rules.cc',
@@ -34,8 +46,6 @@
'core/compound_event_filter.h',
'core/cursor_manager.cc',
'core/cursor_manager.h',
- 'core/default_activation_client.cc',
- 'core/default_activation_client.h',
'core/easy_resize_window_targeter.cc',
'core/easy_resize_window_targeter.h',
'core/focus_controller.cc',
@@ -70,34 +80,11 @@
'core/window_modality_controller.h',
'core/window_util.cc',
'core/window_util.h',
+ 'core/wm_core_export.h',
'core/wm_core_switches.cc',
'core/wm_core_switches.h',
'core/wm_state.cc',
'core/wm_state.h',
- 'public/activation_change_observer.h',
- 'public/activation_change_observer.cc',
- 'public/activation_client.cc',
- 'public/activation_client.h',
- 'public/activation_delegate.cc',
- 'public/activation_delegate.h',
- 'public/animation_host.cc',
- 'public/animation_host.h',
- 'public/dispatcher_client.cc',
- 'public/dispatcher_client.h',
- 'public/drag_drop_client.cc',
- 'public/drag_drop_client.h',
- 'public/drag_drop_delegate.cc',
- 'public/drag_drop_delegate.h',
- 'public/scoped_tooltip_disabler.cc',
- 'public/scoped_tooltip_disabler.h',
- 'public/tooltip_client.cc',
- 'public/tooltip_client.h',
- 'public/transient_window_client.cc',
- 'public/transient_window_client.h',
- 'public/window_move_client.cc',
- 'public/window_move_client.h',
- 'public/window_types.h',
- 'wm_export.h',
],
},
{
@@ -106,7 +93,6 @@
'dependencies': [
'../../skia/skia.gyp:skia',
'../aura/aura.gyp:aura',
- 'wm',
],
'sources': [
'test/wm_test_helper.cc',
@@ -129,7 +115,7 @@
'../gfx/gfx.gyp:gfx_geometry',
'../gfx/gfx.gyp:gfx',
'../base/ui_base.gyp:ui_base',
- 'wm',
+ 'wm_core',
'wm_test_support',
],
'sources': [
diff --git a/ui/wm/wm_export.h b/ui/wm/wm_export.h
deleted file mode 100644
index 0dc0f04..0000000
--- a/ui/wm/wm_export.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_WM_WM_EXPORT_H_
-#define UI_WM_WM_EXPORT_H_
-
-// Defines WM_CORE_EXPORT so that functionality implemented by the Views module
-// can be exported to consumers.
-
-#if defined(COMPONENT_BUILD)
-#if defined(WIN32)
-
-#if defined(WM_IMPLEMENTATION)
-#define WM_EXPORT __declspec(dllexport)
-#else
-#define WM_EXPORT __declspec(dllimport)
-#endif // defined(WM_IMPLEMENTATION)
-
-#else // defined(WIN32)
-#if defined(WM_IMPLEMENTATION)
-#define WM_EXPORT __attribute__((visibility("default")))
-#else
-#define WM_EXPORT
-#endif
-#endif
-
-#else // defined(COMPONENT_BUILD)
-#define WM_EXPORT
-#endif
-
-#endif // UI_WM_WM_EXPORT_H_