summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc2
-rw-r--r--content/content_shell.gypi1
-rw-r--r--content/shell/DEPS2
-rw-r--r--content/shell/shell_aura.cc13
-rw-r--r--content/shell/shell_stacking_client_ash.cc4
-rw-r--r--content/shell/shell_stacking_client_ash.h6
-rw-r--r--ui/aura/aura.gyp24
-rw-r--r--ui/aura/bench/bench_main.cc4
-rw-r--r--ui/aura/client/activation_change_observer.cc16
-rw-r--r--ui/aura/client/activation_change_observer.h3
-rw-r--r--ui/aura/client/default_capture_client.cc (renamed from ui/aura/shared/root_window_capture_client.cc)27
-rw-r--r--ui/aura/client/default_capture_client.h (renamed from ui/aura/shared/root_window_capture_client.h)24
-rw-r--r--ui/aura/demo/demo_main.cc7
-rw-r--r--ui/aura/desktop/desktop_activation_client.h8
-rw-r--r--ui/aura/desktop/desktop_cursor_client.h4
-rw-r--r--ui/aura/desktop/desktop_dispatcher_client.h3
-rw-r--r--ui/aura/desktop/desktop_screen.h4
-rw-r--r--ui/aura/desktop/desktop_screen_win.h4
-rw-r--r--ui/aura/desktop/desktop_stacking_client.cc4
-rw-r--r--ui/aura/desktop/desktop_stacking_client.h10
-rw-r--r--ui/aura/shared/compound_event_filter.h4
-rw-r--r--ui/aura/shared/compound_event_filter_unittest.cc1
-rw-r--r--ui/aura/shared/input_method_event_filter.h4
-rw-r--r--ui/aura/test/aura_test_helper.cc7
-rw-r--r--ui/aura/test/aura_test_helper.h6
-rw-r--r--ui/views/corewm/DEPS4
-rw-r--r--ui/views/corewm/README.chromium2
-rw-r--r--ui/views/views.gyp34
-rw-r--r--ui/views/widget/desktop_aura/README.chromium2
-rw-r--r--ui/views/widget/desktop_capture_client.cc44
-rw-r--r--ui/views/widget/desktop_capture_client.h33
-rw-r--r--ui/views/widget/desktop_root_window_host_linux.cc4
-rw-r--r--ui/views/widget/desktop_root_window_host_linux.h4
-rw-r--r--ui/views/widget/desktop_root_window_host_win.cc4
-rw-r--r--ui/views/widget/desktop_root_window_host_win.h4
35 files changed, 142 insertions, 185 deletions
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
index f92e39e..73b1d43 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
@@ -29,6 +29,7 @@ ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() {
}
void ChromeBrowserMainExtraPartsAura::PreProfileInit() {
+#if !defined(OS_CHROMEOS)
#if defined(USE_ASH)
if (!chrome::ShouldOpenAshOnStartup())
#endif
@@ -38,6 +39,7 @@ void ChromeBrowserMainExtraPartsAura::PreProfileInit() {
aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
stacking_client_.reset(new aura::DesktopStackingClient);
}
+#endif
#if !defined(USE_ASH) && defined(OS_LINUX)
// TODO(erg): Refactor this into a dlopen call when we add a GTK3 port.
diff --git a/content/content_shell.gypi b/content/content_shell.gypi
index deabfdd..43f4da7 100644
--- a/content/content_shell.gypi
+++ b/content/content_shell.gypi
@@ -185,6 +185,7 @@
}], # use_aura==1
['chromeos==1', {
'dependencies': [
+ '../ash/ash.gyp:ash',
'../chromeos/chromeos.gyp:chromeos',
],
}], # chromeos==1
diff --git a/content/shell/DEPS b/content/shell/DEPS
index 64bcfea..b7fd438 100644
--- a/content/shell/DEPS
+++ b/content/shell/DEPS
@@ -19,6 +19,8 @@ include_rules = [
# The content_shell for aura must work with the views and aura
"+ui/aura",
"+ui/views",
+ # Ash is needed for ScreenAsh on ChromeOS.
+ "+ash",
# For WebTestRunner library
"+third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public",
diff --git a/content/shell/shell_aura.cc b/content/shell/shell_aura.cc
index aa6b765..fa58914 100644
--- a/content/shell/shell_aura.cc
+++ b/content/shell/shell_aura.cc
@@ -29,6 +29,7 @@
#include "ui/views/widget/widget_delegate.h"
#if defined(OS_CHROMEOS)
+#include "ash/screen_ash.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "content/shell/shell_stacking_client_ash.h"
#else
@@ -192,7 +193,7 @@ class ShellWindowDelegateView : public WidgetDelegateView,
layout->AddPaddingRow(0, 5);
}
- // Overriden from TextfieldController
+ // Overridden from TextfieldController
virtual void ContentsChanged(Textfield* sender,
const string16& new_contents) OVERRIDE {
}
@@ -211,7 +212,7 @@ class ShellWindowDelegateView : public WidgetDelegateView,
return false;
}
- // Overriden from ButtonListener
+ // Overridden from ButtonListener
virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE {
if (sender == back_button_)
shell_->GoBackOrForward(-1);
@@ -223,7 +224,7 @@ class ShellWindowDelegateView : public WidgetDelegateView,
shell_->Stop();
}
- // Overriden from WidgetDelegateView
+ // Overridden from WidgetDelegateView
virtual bool CanResize() const OVERRIDE { return true; }
virtual bool CanMaximize() const OVERRIDE { return true; }
virtual string16 GetWindowTitle() const OVERRIDE {
@@ -237,7 +238,7 @@ class ShellWindowDelegateView : public WidgetDelegateView,
}
virtual View* GetContentsView() OVERRIDE { return this; }
- // Overriden from View
+ // Overridden from View
virtual void ViewHierarchyChanged(bool is_add,
View* parent,
View* child) OVERRIDE {
@@ -285,11 +286,13 @@ void Shell::PlatformInitialize() {
aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
#if defined(OS_CHROMEOS)
stacking_client_ = new content::ShellStackingClientAsh();
+ gfx::Screen::SetScreenInstance(
+ gfx::SCREEN_TYPE_NATIVE, new ash::ScreenAsh);
#else
stacking_client_ = new aura::DesktopStackingClient();
-#endif
gfx::Screen::SetScreenInstance(
gfx::SCREEN_TYPE_NATIVE, aura::CreateDesktopScreen());
+#endif
views_delegate_ = new ShellViewsDelegateAura();
}
diff --git a/content/shell/shell_stacking_client_ash.cc b/content/shell/shell_stacking_client_ash.cc
index 2890270..5e3fc8a 100644
--- a/content/shell/shell_stacking_client_ash.cc
+++ b/content/shell/shell_stacking_client_ash.cc
@@ -4,11 +4,11 @@
#include "content/shell/shell_stacking_client_ash.h"
+#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/focus_manager.h"
#include "ui/aura/root_window.h"
#include "ui/aura/shared/compound_event_filter.h"
#include "ui/aura/shared/input_method_event_filter.h"
-#include "ui/aura/shared/root_window_capture_client.h"
#include "ui/aura/test/test_activation_client.h"
namespace content {
@@ -48,7 +48,7 @@ aura::Window* ShellStackingClientAsh::GetDefaultParent(
new aura::test::TestActivationClient(root_window_.get()));
capture_client_.reset(
- new aura::shared::RootWindowCaptureClient(root_window_.get()));
+ new aura::client::DefaultCaptureClient(root_window_.get()));
}
return root_window_.get();
}
diff --git a/content/shell/shell_stacking_client_ash.h b/content/shell/shell_stacking_client_ash.h
index c059044..da8095f 100644
--- a/content/shell/shell_stacking_client_ash.h
+++ b/content/shell/shell_stacking_client_ash.h
@@ -12,10 +12,12 @@
namespace aura {
class RootWindow;
class Window;
+namespace client {
+class DefaultCaptureClient;
+}
namespace shared {
class CompoundEventFilter;
class InputMethodEventFilter;
-class RootWindowCaptureClient;
}
namespace test {
class TestActivationClient;
@@ -46,7 +48,7 @@ class ShellStackingClientAsh : public aura::client::StackingClient {
// Owned by RootWindow
aura::shared::CompoundEventFilter* root_window_event_filter_;
- scoped_ptr<aura::shared::RootWindowCaptureClient> capture_client_;
+ scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
scoped_ptr<aura::shared::InputMethodEventFilter> input_method_filter_;
scoped_ptr<aura::test::TestActivationClient> test_activation_client_;
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index 76b7fe8..68d7c36 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -25,6 +25,8 @@
'sources': [
'aura_switches.cc',
'aura_switches.h',
+ 'client/activation_change_observer.h',
+ 'client/activation_change_observer.cc',
'client/activation_client.cc',
'client/activation_client.h',
'client/activation_delegate.cc',
@@ -36,6 +38,8 @@
'client/capture_delegate.h',
'client/cursor_client.cc',
'client/cursor_client.h',
+ 'client/default_capture_client.cc',
+ 'client/default_capture_client.h',
'client/dispatcher_client.cc',
'client/dispatcher_client.h',
'client/drag_drop_client.cc',
@@ -57,18 +61,6 @@
'client/window_move_client.cc',
'client/window_move_client.h',
'client/window_types.h',
- 'desktop/desktop_activation_client.cc',
- 'desktop/desktop_activation_client.h',
- 'desktop/desktop_cursor_client.cc',
- 'desktop/desktop_cursor_client.h',
- 'desktop/desktop_dispatcher_client.cc',
- 'desktop/desktop_dispatcher_client.h',
- 'desktop/desktop_screen.h',
- 'desktop/desktop_screen_win.cc',
- 'desktop/desktop_screen_win.h',
- 'desktop/desktop_screen_x11.cc',
- 'desktop/desktop_stacking_client.cc',
- 'desktop/desktop_stacking_client.h',
'device_list_updater_aurax11.cc',
'device_list_updater_aurax11.h',
'dispatcher_win.cc',
@@ -104,12 +96,6 @@
'root_window_view_mac.mm',
'root_window.cc',
'root_window.h',
- 'shared/compound_event_filter.cc',
- 'shared/compound_event_filter.h',
- 'shared/input_method_event_filter.cc',
- 'shared/input_method_event_filter.h',
- 'shared/root_window_capture_client.cc',
- 'shared/root_window_capture_client.h',
'single_display_manager.cc',
'single_display_manager.h',
'ui_controls_win.cc',
@@ -279,8 +265,6 @@
'test/test_suite.cc',
'test/test_suite.h',
'root_window_unittest.cc',
- 'shared/compound_event_filter_unittest.cc',
- 'shared/input_method_event_filter_unittest.cc',
'event_filter_unittest.cc',
'window_unittest.cc',
],
diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc
index f105854..c15ece4 100644
--- a/ui/aura/bench/bench_main.cc
+++ b/ui/aura/bench/bench_main.cc
@@ -12,11 +12,11 @@
#include "base/time.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/skia/include/core/SkXfermode.h"
+#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/env.h"
#include "ui/aura/focus_manager.h"
#include "ui/aura/root_window.h"
#include "ui/aura/single_display_manager.h"
-#include "ui/aura/shared/root_window_capture_client.h"
#include "ui/aura/window.h"
#include "ui/base/hit_test.h"
#include "ui/base/resource/resource_bundle.h"
@@ -304,7 +304,7 @@ int main(int argc, char** argv) {
aura::DisplayManager::CreateRootWindowForPrimaryDisplay());
aura::client::SetCaptureClient(
root_window.get(),
- new aura::shared::RootWindowCaptureClient(root_window.get()));
+ new aura::client::DefaultCaptureClient(root_window.get()));
scoped_ptr<aura::FocusManager> focus_manager(new aura::FocusManager);
root_window->set_focus_manager(focus_manager.get());
diff --git a/ui/aura/client/activation_change_observer.cc b/ui/aura/client/activation_change_observer.cc
new file mode 100644
index 0000000..7d3d4fe
--- /dev/null
+++ b/ui/aura/client/activation_change_observer.cc
@@ -0,0 +1,16 @@
+// Copyright (c) 2012 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.
+
+#include "ui/aura/client/activation_change_observer.h"
+
+namespace aura {
+namespace client {
+
+// TODO(beng): For some reason, we need these in a separate .cc file for
+// dependent targets to link on windows!
+ActivationChangeObserver::ActivationChangeObserver() {}
+ActivationChangeObserver::~ActivationChangeObserver() {}
+
+} // namespace client
+} // namespace aura
diff --git a/ui/aura/client/activation_change_observer.h b/ui/aura/client/activation_change_observer.h
index ae4195a..622026a 100644
--- a/ui/aura/client/activation_change_observer.h
+++ b/ui/aura/client/activation_change_observer.h
@@ -21,7 +21,8 @@ class AURA_EXPORT ActivationChangeObserver {
virtual void OnWindowActivated(Window* active, Window* old_active) = 0;
protected:
- virtual ~ActivationChangeObserver() {}
+ ActivationChangeObserver();
+ virtual ~ActivationChangeObserver();
};
} // namespace client
diff --git a/ui/aura/shared/root_window_capture_client.cc b/ui/aura/client/default_capture_client.cc
index 0608dad..10389dc 100644
--- a/ui/aura/shared/root_window_capture_client.cc
+++ b/ui/aura/client/default_capture_client.cc
@@ -2,36 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/aura/shared/root_window_capture_client.h"
+#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
namespace aura {
-namespace shared {
+namespace client {
-////////////////////////////////////////////////////////////////////////////////
-// RootWindowCaptureClient, public:
-
-RootWindowCaptureClient::RootWindowCaptureClient(RootWindow* root_window)
+DefaultCaptureClient::DefaultCaptureClient(RootWindow* root_window)
: root_window_(root_window),
capture_window_(NULL) {
- client::SetCaptureClient(root_window, this);
+ client::SetCaptureClient(root_window_, this);
}
-RootWindowCaptureClient::~RootWindowCaptureClient() {
+DefaultCaptureClient::~DefaultCaptureClient() {
client::SetCaptureClient(root_window_, NULL);
}
-////////////////////////////////////////////////////////////////////////////////
-// RootWindowCaptureClient, client::CaptureClient implementation:
-
-void RootWindowCaptureClient::SetCapture(Window* window) {
+void DefaultCaptureClient::SetCapture(Window* window) {
if (capture_window_ == window)
return;
root_window_->gesture_recognizer()->TransferEventsTo(capture_window_, window);
- aura::Window* old_capture_window = capture_window_;
+ Window* old_capture_window = capture_window_;
capture_window_ = window;
if (capture_window_)
@@ -42,15 +35,15 @@ void RootWindowCaptureClient::SetCapture(Window* window) {
root_window_->UpdateCapture(old_capture_window, capture_window_);
}
-void RootWindowCaptureClient::ReleaseCapture(Window* window) {
+void DefaultCaptureClient::ReleaseCapture(Window* window) {
if (capture_window_ != window)
return;
SetCapture(NULL);
}
-Window* RootWindowCaptureClient::GetCaptureWindow() {
+Window* DefaultCaptureClient::GetCaptureWindow() {
return capture_window_;
}
-} // namespace shared
+} // namespace client
} // namespace aura
diff --git a/ui/aura/shared/root_window_capture_client.h b/ui/aura/client/default_capture_client.h
index f86485c..a628b2d 100644
--- a/ui/aura/shared/root_window_capture_client.h
+++ b/ui/aura/client/default_capture_client.h
@@ -2,37 +2,35 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_AURA_SHARED_ROOT_WINDOW_CAPTURE_CLIENT_H_
-#define UI_AURA_SHARED_ROOT_WINDOW_CAPTURE_CLIENT_H_
+#ifndef UI_AURA_CLIENT_DEFAULT_CAPTURE_CLIENT_H_
+#define UI_AURA_CLIENT_DEFAULT_CAPTURE_CLIENT_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "ui/aura/client/capture_client.h"
#include "ui/aura/aura_export.h"
+#include "ui/aura/client/capture_client.h"
namespace aura {
-class RootWindow;
-
-namespace shared {
+namespace client {
-class AURA_EXPORT RootWindowCaptureClient : public client::CaptureClient {
+class AURA_EXPORT DefaultCaptureClient : public client::CaptureClient {
public:
- explicit RootWindowCaptureClient(RootWindow* root_window);
- virtual ~RootWindowCaptureClient();
+ explicit DefaultCaptureClient(RootWindow* root_window);
+ virtual ~DefaultCaptureClient();
+ private:
// Overridden from client::CaptureClient:
virtual void SetCapture(Window* window) OVERRIDE;
virtual void ReleaseCapture(Window* window) OVERRIDE;
virtual Window* GetCaptureWindow() OVERRIDE;
- private:
RootWindow* root_window_;
Window* capture_window_;
- DISALLOW_COPY_AND_ASSIGN(RootWindowCaptureClient);
+ DISALLOW_COPY_AND_ASSIGN(DefaultCaptureClient);
};
-} // namespace shared
+} // namespace client
} // namespace aura
-#endif // UI_AURA_SHARED_ROOT_WINDOW_CAPTURE_CLIENT_H_
+#endif // UI_AURA_CLIENT_DEFAULT_CAPTURE_CLIENT_H_
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc
index e30b2e4..451affb5 100644
--- a/ui/aura/demo/demo_main.cc
+++ b/ui/aura/demo/demo_main.cc
@@ -8,10 +8,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "third_party/skia/include/core/SkXfermode.h"
+#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/client/stacking_client.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/shared/root_window_capture_client.h"
#include "ui/aura/single_display_manager.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
@@ -102,10 +102,9 @@ class DemoStackingClient : public aura::client::StackingClient {
// Overridden from aura::client::StackingClient:
virtual aura::Window* GetDefaultParent(aura::Window* window,
const gfx::Rect& bounds) OVERRIDE {
-
if (!capture_client_.get()) {
capture_client_.reset(
- new aura::shared::RootWindowCaptureClient(root_window_));
+ new aura::client::DefaultCaptureClient(root_window_));
}
return root_window_;
}
@@ -113,7 +112,7 @@ class DemoStackingClient : public aura::client::StackingClient {
private:
aura::RootWindow* root_window_;
- scoped_ptr<aura::shared::RootWindowCaptureClient> capture_client_;
+ scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
DISALLOW_COPY_AND_ASSIGN(DemoStackingClient);
};
diff --git a/ui/aura/desktop/desktop_activation_client.h b/ui/aura/desktop/desktop_activation_client.h
index a3b321c..00818f4 100644
--- a/ui/aura/desktop/desktop_activation_client.h
+++ b/ui/aura/desktop/desktop_activation_client.h
@@ -8,12 +8,12 @@
#include "base/basictypes.h"
#include "base/observer_list.h"
#include "base/scoped_observer.h"
-#include "ui/aura/aura_export.h"
#include "ui/aura/client/activation_client.h"
#include "ui/aura/env_observer.h"
#include "ui/aura/focus_change_observer.h"
#include "ui/aura/root_window_observer.h"
#include "ui/aura/window_observer.h"
+#include "ui/views/views_export.h"
namespace aura {
class FocusManager;
@@ -24,9 +24,9 @@ class ActivationChangeObserver;
// An activation client that handles activation events in a single
// RootWindow. Used only on the Desktop where there can be multiple RootWindow
// objects.
-class AURA_EXPORT DesktopActivationClient : public client::ActivationClient,
- public WindowObserver,
- public FocusChangeObserver {
+class VIEWS_EXPORT DesktopActivationClient : public client::ActivationClient,
+ public WindowObserver,
+ public FocusChangeObserver {
public:
explicit DesktopActivationClient(FocusManager* focus_manager);
virtual ~DesktopActivationClient();
diff --git a/ui/aura/desktop/desktop_cursor_client.h b/ui/aura/desktop/desktop_cursor_client.h
index 0f292e2..e619106 100644
--- a/ui/aura/desktop/desktop_cursor_client.h
+++ b/ui/aura/desktop/desktop_cursor_client.h
@@ -7,8 +7,8 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "ui/aura/aura_export.h"
#include "ui/aura/client/cursor_client.h"
+#include "ui/views/views_export.h"
namespace ui {
class CursorLoader;
@@ -19,7 +19,7 @@ class RootWindow;
// A CursorClient that interacts with only one RootWindow. (Unlike the one in
// ash, which interacts with all the RootWindows.)
-class AURA_EXPORT DesktopCursorClient : public client::CursorClient {
+class VIEWS_EXPORT DesktopCursorClient : public client::CursorClient {
public:
explicit DesktopCursorClient(aura::RootWindow* window);
virtual ~DesktopCursorClient();
diff --git a/ui/aura/desktop/desktop_dispatcher_client.h b/ui/aura/desktop/desktop_dispatcher_client.h
index 434334e..2237cfe 100644
--- a/ui/aura/desktop/desktop_dispatcher_client.h
+++ b/ui/aura/desktop/desktop_dispatcher_client.h
@@ -7,11 +7,12 @@
#include "base/basictypes.h"
#include "ui/aura/client/dispatcher_client.h"
+#include "ui/views/views_export.h"
namespace aura {
// TODO(erg): I won't lie to you; I have no idea what this is or what it does.
-class AURA_EXPORT DesktopDispatcherClient : public client::DispatcherClient {
+class VIEWS_EXPORT DesktopDispatcherClient : public client::DispatcherClient {
public:
DesktopDispatcherClient();
virtual ~DesktopDispatcherClient();
diff --git a/ui/aura/desktop/desktop_screen.h b/ui/aura/desktop/desktop_screen.h
index adc3ed3..d177bd8 100644
--- a/ui/aura/desktop/desktop_screen.h
+++ b/ui/aura/desktop/desktop_screen.h
@@ -5,7 +5,7 @@
#ifndef UI_AURA_DESKTOP_DESKTOP_SCREEN_H_
#define UI_AURA_DESKTOP_DESKTOP_SCREEN_H_
-#include "ui/aura/aura_export.h"
+#include "ui/views/views_export.h"
namespace gfx {
class Screen;
@@ -15,7 +15,7 @@ namespace aura {
// Creates a Screen that represents the screen of the environment that hosts
// a RootWindowHost. Caller owns the result.
-AURA_EXPORT gfx::Screen* CreateDesktopScreen();
+VIEWS_EXPORT gfx::Screen* CreateDesktopScreen();
} // namespace aura
diff --git a/ui/aura/desktop/desktop_screen_win.h b/ui/aura/desktop/desktop_screen_win.h
index 5ebf886..93d482e 100644
--- a/ui/aura/desktop/desktop_screen_win.h
+++ b/ui/aura/desktop/desktop_screen_win.h
@@ -5,12 +5,12 @@
#ifndef UI_AURA_DESKTOP_DESKTOP_SCREEN_WIN_H_
#define UI_AURA_DESKTOP_DESKTOP_SCREEN_WIN_H_
-#include "ui/aura/aura_export.h"
#include "ui/gfx/screen_win.h"
+#include "ui/views/views_export.h"
namespace aura {
-class AURA_EXPORT DesktopScreenWin : public gfx::ScreenWin {
+class VIEWS_EXPORT DesktopScreenWin : public gfx::ScreenWin {
public:
DesktopScreenWin();
virtual ~DesktopScreenWin();
diff --git a/ui/aura/desktop/desktop_stacking_client.cc b/ui/aura/desktop/desktop_stacking_client.cc
index 5dc1ca2..afc0713 100644
--- a/ui/aura/desktop/desktop_stacking_client.cc
+++ b/ui/aura/desktop/desktop_stacking_client.cc
@@ -4,9 +4,9 @@
#include "ui/aura/desktop/desktop_stacking_client.h"
+#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/focus_manager.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/shared/root_window_capture_client.h"
#include "ui/aura/window.h"
namespace aura {
@@ -28,7 +28,7 @@ Window* DesktopStackingClient::GetDefaultParent(Window* window,
null_parent_->set_focus_manager(new FocusManager);
capture_client_.reset(
- new aura::shared::RootWindowCaptureClient(null_parent_.get()));
+ new aura::client::DefaultCaptureClient(null_parent_.get()));
}
return null_parent_.get();
}
diff --git a/ui/aura/desktop/desktop_stacking_client.h b/ui/aura/desktop/desktop_stacking_client.h
index 9baaab8..e5c6c89 100644
--- a/ui/aura/desktop/desktop_stacking_client.h
+++ b/ui/aura/desktop/desktop_stacking_client.h
@@ -10,19 +10,19 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "ui/aura/aura_export.h"
+#include "ui/views/views_export.h"
namespace aura {
class RootWindow;
class Window;
-namespace shared {
-class RootWindowCaptureClient;
+namespace client {
+class DefaultCaptureClient;
}
// A stacking client for the desktop; always sets the default parent to the
// RootWindow of the passed in Window.
-class AURA_EXPORT DesktopStackingClient : public client::StackingClient {
+class VIEWS_EXPORT DesktopStackingClient : public client::StackingClient {
public:
DesktopStackingClient();
virtual ~DesktopStackingClient();
@@ -35,7 +35,7 @@ class AURA_EXPORT DesktopStackingClient : public client::StackingClient {
// Windows with NULL parents are parented to this.
scoped_ptr<aura::RootWindow> null_parent_;
- scoped_ptr<aura::shared::RootWindowCaptureClient> capture_client_;
+ scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
DISALLOW_COPY_AND_ASSIGN(DesktopStackingClient);
};
diff --git a/ui/aura/shared/compound_event_filter.h b/ui/aura/shared/compound_event_filter.h
index d19ed7d..ab094bb 100644
--- a/ui/aura/shared/compound_event_filter.h
+++ b/ui/aura/shared/compound_event_filter.h
@@ -7,8 +7,8 @@
#include "base/compiler_specific.h"
#include "base/observer_list.h"
-#include "ui/aura/aura_export.h"
#include "ui/aura/event_filter.h"
+#include "ui/views/views_export.h"
namespace ui {
class GestureEvent;
@@ -32,7 +32,7 @@ namespace shared {
// 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 AURA_EXPORT CompoundEventFilter : public EventFilter {
+class VIEWS_EXPORT CompoundEventFilter : public EventFilter {
public:
CompoundEventFilter();
virtual ~CompoundEventFilter();
diff --git a/ui/aura/shared/compound_event_filter_unittest.cc b/ui/aura/shared/compound_event_filter_unittest.cc
index eb20800..c797700 100644
--- a/ui/aura/shared/compound_event_filter_unittest.cc
+++ b/ui/aura/shared/compound_event_filter_unittest.cc
@@ -8,7 +8,6 @@
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/shared/root_window_capture_client.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_activation_client.h"
diff --git a/ui/aura/shared/input_method_event_filter.h b/ui/aura/shared/input_method_event_filter.h
index 5aab1f5..90b0d3d 100644
--- a/ui/aura/shared/input_method_event_filter.h
+++ b/ui/aura/shared/input_method_event_filter.h
@@ -8,9 +8,9 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "ui/aura/aura_export.h"
#include "ui/aura/event_filter.h"
#include "ui/base/ime/input_method_delegate.h"
+#include "ui/views/views_export.h"
namespace ui {
class InputMethod;
@@ -23,7 +23,7 @@ namespace shared {
// An event filter that forwards a KeyEvent to a system IME, and dispatches a
// TranslatedKeyEvent to the root window as needed.
-class AURA_EXPORT InputMethodEventFilter
+class VIEWS_EXPORT InputMethodEventFilter
: public EventFilter,
public ui::internal::InputMethodDelegate {
public:
diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc
index 8267715..73ab56a 100644
--- a/ui/aura/test/aura_test_helper.cc
+++ b/ui/aura/test/aura_test_helper.cc
@@ -7,11 +7,11 @@
#include "base/message_loop.h"
#include "base/run_loop.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/env.h"
#include "ui/aura/focus_manager.h"
#include "ui/aura/display_manager.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/shared/root_window_capture_client.h"
#include "ui/aura/single_display_manager.h"
#include "ui/aura/test/test_activation_client.h"
#include "ui/aura/test/test_screen.h"
@@ -55,8 +55,7 @@ void AuraTestHelper::SetUp() {
stacking_client_.reset(new TestStackingClient(root_window_.get()));
test_activation_client_.reset(
new test::TestActivationClient(root_window_.get()));
- root_window_capture_client_.reset(
- new shared::RootWindowCaptureClient(root_window_.get()));
+ capture_client_.reset(new client::DefaultCaptureClient(root_window_.get()));
test_input_method_.reset(new ui::test::DummyInputMethod);
root_window_->SetProperty(
aura::client::kRootWindowInputMethodKey,
@@ -72,7 +71,7 @@ void AuraTestHelper::TearDown() {
test_input_method_.reset();
stacking_client_.reset();
test_activation_client_.reset();
- root_window_capture_client_.reset();
+ capture_client_.reset();
focus_manager_.reset();
root_window_.reset();
test_screen_.reset();
diff --git a/ui/aura/test/aura_test_helper.h b/ui/aura/test/aura_test_helper.h
index d064a84..8b8e007 100644
--- a/ui/aura/test/aura_test_helper.h
+++ b/ui/aura/test/aura_test_helper.h
@@ -18,8 +18,8 @@ namespace aura {
class FocusManager;
class RootWindow;
class TestScreen;
-namespace shared {
-class RootWindowCaptureClient;
+namespace client {
+class DefaultCaptureClient;
}
namespace test {
class TestActivationClient;
@@ -53,7 +53,7 @@ class AuraTestHelper {
scoped_ptr<RootWindow> root_window_;
scoped_ptr<TestStackingClient> stacking_client_;
scoped_ptr<TestActivationClient> test_activation_client_;
- scoped_ptr<shared::RootWindowCaptureClient> root_window_capture_client_;
+ scoped_ptr<client::DefaultCaptureClient> capture_client_;
scoped_ptr<ui::InputMethod> test_input_method_;
scoped_ptr<FocusManager> focus_manager_;
scoped_ptr<aura::TestScreen> test_screen_;
diff --git a/ui/views/corewm/DEPS b/ui/views/corewm/DEPS
new file mode 100644
index 0000000..06abf63
--- /dev/null
+++ b/ui/views/corewm/DEPS
@@ -0,0 +1,4 @@
+# This code should not depend on Views.
+
+"-ui/views",
+"+ui/views/views_export.h"
diff --git a/ui/views/corewm/README.chromium b/ui/views/corewm/README.chromium
new file mode 100644
index 0000000..a5513c4
--- /dev/null
+++ b/ui/views/corewm/README.chromium
@@ -0,0 +1,2 @@
+This directory contains window-manager code that is shared by Ash and the
+Desktop Aura implementation.
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index fba3e03..6c1a047 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -238,6 +238,11 @@
'controls/tree/tree_view_views.h',
'controls/tree/tree_view_win.cc',
'controls/tree/tree_view_win.h',
+ # TODO(beng): rename to 'corewm/' hence this sort order:
+ '../aura/shared/compound_event_filter.cc',
+ '../aura/shared/compound_event_filter.h',
+ '../aura/shared/input_method_event_filter.cc',
+ '../aura/shared/input_method_event_filter.h',
'debug_utils.cc',
'debug_utils.h',
'drag_controller.h',
@@ -316,8 +321,19 @@
'widget/child_window_message_processor.h',
'widget/default_theme_provider.cc',
'widget/default_theme_provider.h',
- 'widget/desktop_capture_client.cc',
- 'widget/desktop_capture_client.h',
+ # TODO(beng): rename to 'widget/desktop_aura/' hence this sort order:
+ '../aura/desktop/desktop_activation_client.cc',
+ '../aura/desktop/desktop_activation_client.h',
+ '../aura/desktop/desktop_cursor_client.cc',
+ '../aura/desktop/desktop_cursor_client.h',
+ '../aura/desktop/desktop_dispatcher_client.cc',
+ '../aura/desktop/desktop_dispatcher_client.h',
+ '../aura/desktop/desktop_screen.h',
+ '../aura/desktop/desktop_screen_win.cc',
+ '../aura/desktop/desktop_screen_win.h',
+ '../aura/desktop/desktop_screen_x11.cc',
+ '../aura/desktop/desktop_stacking_client.cc',
+ '../aura/desktop/desktop_stacking_client.h',
'widget/desktop_layout_manager.cc',
'widget/desktop_layout_manager.h',
'widget/desktop_native_widget_aura.cc',
@@ -420,13 +436,15 @@
['OS=="mac"', {
'sources/': [
['exclude', 'mouse_watcher.cc'],
- ['exclude', 'controls/menu/*'],
- ['exclude', 'controls/scrollbar/*'],
+ ['exclude', 'controls/menu/'],
+ ['exclude', 'controls/scrollbar/'],
['exclude', 'focus/accelerator_handler_aura.cc'],
],
}],
['OS=="win"', {
'sources/': [
+ ['include', '../aura/desktop/desktop_screen_win.cc'],
+ ['include', '../aura/desktop/desktop_screen_win.h'],
['include', 'ime/input_method_win.cc'],
['include', 'ime/input_method_win.h'],
['include', 'widget/desktop_root_window_host_win.cc'],
@@ -437,6 +455,8 @@
}],
['use_aura==0', {
'sources/': [
+ ['exclude', '../aura/shared/'],
+ ['exclude', '../aura/desktop/'],
['exclude', '/desktop_[^/]*\\.cc$'],
['exclude', '/x11_[^/]*\\.cc$'],
['exclude', 'widget/native_widget_aura_window_observer.cc'],
@@ -448,6 +468,8 @@
['chromeos==1', {
'sources/': [
['exclude', '/desktop_[^/]*\\.cc$'],
+ ['exclude', 'widget/x11_*'],
+ ['exclude', '../aura/desktop/'],
],
}],
['use_aura==0 and OS=="win"', {
@@ -597,6 +619,9 @@
'controls/textfield/native_textfield_views_unittest.cc',
'controls/textfield/textfield_views_model_unittest.cc',
'controls/tree/tree_view_views_unittest.cc',
+ # TODO(beng): rename 'corewm/' hence this sort order
+ '../aura/shared/compound_event_filter_unittest.cc',
+ '../aura/shared/input_method_event_filter_unittest.cc',
'focus/focus_manager_test.h',
'focus/focus_manager_test.cc',
'focus/focus_manager_unittest.cc',
@@ -649,6 +674,7 @@
],
}, {
'sources/': [
+ ['exclude', '../aura/shared/'],
['exclude', '../aura/test/test_desktop_delegate.cc'],
['exclude', '../aura/test/test_desktop_delegate.h'],
['exclude', 'widget/native_widget_aura_unittest.cc'],
diff --git a/ui/views/widget/desktop_aura/README.chromium b/ui/views/widget/desktop_aura/README.chromium
new file mode 100644
index 0000000..5e0ff71
--- /dev/null
+++ b/ui/views/widget/desktop_aura/README.chromium
@@ -0,0 +1,2 @@
+This directory contains the views::NativeWidget implementation used for the
+Desktop Aura port, and required supporting infrastructure.
diff --git a/ui/views/widget/desktop_capture_client.cc b/ui/views/widget/desktop_capture_client.cc
deleted file mode 100644
index 2c7cc6a..0000000
--- a/ui/views/widget/desktop_capture_client.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "ui/views/widget/desktop_capture_client.h"
-
-#include "ui/aura/root_window.h"
-#include "ui/aura/window.h"
-
-namespace views {
-
-DesktopCaptureClient::DesktopCaptureClient() : capture_window_(NULL) {
-}
-
-DesktopCaptureClient::~DesktopCaptureClient() {
-}
-
-void DesktopCaptureClient::SetCapture(aura::Window* window) {
- if (window) {
- DCHECK(window->GetRootWindow());
- if (capture_window_)
- DCHECK_EQ(window->GetRootWindow(), capture_window_->GetRootWindow());
- }
-
- aura::Window* old_capture = capture_window_;
- capture_window_ = window;
-
- aura::RootWindow* root_window = window ? window->GetRootWindow() :
- capture_window_ ? capture_window_->GetRootWindow() : NULL;
- if (root_window)
- root_window->UpdateCapture(old_capture, window);
-}
-
-void DesktopCaptureClient::ReleaseCapture(aura::Window* window) {
- if (capture_window_ != window)
- return;
- SetCapture(NULL);
-}
-
-aura::Window* DesktopCaptureClient::GetCaptureWindow() {
- return capture_window_;
-}
-
-} // namespace views
diff --git a/ui/views/widget/desktop_capture_client.h b/ui/views/widget/desktop_capture_client.h
deleted file mode 100644
index 0e8a945..0000000
--- a/ui/views/widget/desktop_capture_client.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2012 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_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
-#define UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "ui/aura/client/capture_client.h"
-#include "ui/views/views_export.h"
-
-namespace views {
-
-class VIEWS_EXPORT DesktopCaptureClient : public aura::client::CaptureClient {
- public:
- DesktopCaptureClient();
- virtual ~DesktopCaptureClient();
-
- private:
- // Overridden from aura::client::CaptureClient:
- virtual void SetCapture(aura::Window* window) OVERRIDE;
- virtual void ReleaseCapture(aura::Window* window) OVERRIDE;
- virtual aura::Window* GetCaptureWindow() OVERRIDE;
-
- aura::Window* capture_window_;
-
- DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient);
-};
-
-} // namespace views
-
-#endif // UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
diff --git a/ui/views/widget/desktop_root_window_host_linux.cc b/ui/views/widget/desktop_root_window_host_linux.cc
index 27ea922..aa610ae 100644
--- a/ui/views/widget/desktop_root_window_host_linux.cc
+++ b/ui/views/widget/desktop_root_window_host_linux.cc
@@ -12,6 +12,7 @@
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "ui/aura/client/screen_position_client.h"
+#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/client/user_action_client.h"
#include "ui/aura/desktop/desktop_activation_client.h"
#include "ui/aura/desktop/desktop_cursor_client.h"
@@ -25,7 +26,6 @@
#include "ui/base/touch/touch_factory.h"
#include "ui/base/x/x11_util.h"
#include "ui/views/ime/input_method_bridge.h"
-#include "ui/views/widget/desktop_capture_client.h"
#include "ui/views/widget/desktop_layout_manager.h"
#include "ui/views/widget/desktop_native_widget_aura.h"
#include "ui/views/widget/desktop_screen_position_client.h"
@@ -189,7 +189,7 @@ aura::RootWindow* DesktopRootWindowHostLinux::InitRootWindow(
native_widget_delegate_->OnNativeWidgetCreated();
- capture_client_.reset(new DesktopCaptureClient);
+ capture_client_.reset(new aura::client::DefaultCaptureClient(root_window_));
aura::client::SetCaptureClient(root_window_, capture_client_.get());
root_window_->set_focus_manager(
diff --git a/ui/views/widget/desktop_root_window_host_linux.h b/ui/views/widget/desktop_root_window_host_linux.h
index 8e49f5b..7bec494 100644
--- a/ui/views/widget/desktop_root_window_host_linux.h
+++ b/ui/views/widget/desktop_root_window_host_linux.h
@@ -27,6 +27,7 @@ class DesktopCursorClient;
class DesktopDispatcherClient;
class FocusManager;
namespace client {
+class DefaultCaptureClient;
class ScreenPositionClient;
}
namespace shared {
@@ -36,7 +37,6 @@ class InputMethodEventFilter;
}
namespace views {
-class DesktopCaptureClient;
class X11DesktopWindowMoveClient;
class X11WindowEventFilter;
@@ -201,7 +201,7 @@ class VIEWS_EXPORT DesktopRootWindowHostLinux
aura::RootWindow* root_window_;
// aura:: objects that we own.
- scoped_ptr<DesktopCaptureClient> capture_client_;
+ scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
scoped_ptr<aura::DesktopActivationClient> activation_client_;
scoped_ptr<aura::DesktopCursorClient> cursor_client_;
scoped_ptr<aura::DesktopDispatcherClient> dispatcher_client_;
diff --git a/ui/views/widget/desktop_root_window_host_win.cc b/ui/views/widget/desktop_root_window_host_win.cc
index 8cb9bf3..a4e3d7d 100644
--- a/ui/views/widget/desktop_root_window_host_win.cc
+++ b/ui/views/widget/desktop_root_window_host_win.cc
@@ -7,6 +7,7 @@
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/desktop/desktop_activation_client.h"
#include "ui/aura/desktop/desktop_cursor_client.h"
#include "ui/aura/desktop/desktop_dispatcher_client.h"
@@ -22,7 +23,6 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/path_win.h"
#include "ui/views/ime/input_method_win.h"
-#include "ui/views/widget/desktop_capture_client.h"
#include "ui/views/widget/desktop_native_widget_aura.h"
#include "ui/views/widget/desktop_screen_position_client.h"
#include "ui/views/widget/widget_delegate.h"
@@ -107,7 +107,7 @@ aura::RootWindow* DesktopRootWindowHostWin::Init(
native_widget_delegate_->OnNativeWidgetCreated();
- capture_client_.reset(new DesktopCaptureClient);
+ capture_client_.reset(new aura::client::DefaultCaptureClient(root_window_));
aura::client::SetCaptureClient(root_window_, capture_client_.get());
focus_manager_.reset(new aura::FocusManager);
diff --git a/ui/views/widget/desktop_root_window_host_win.h b/ui/views/widget/desktop_root_window_host_win.h
index 5880600..38e3edf 100644
--- a/ui/views/widget/desktop_root_window_host_win.h
+++ b/ui/views/widget/desktop_root_window_host_win.h
@@ -16,6 +16,7 @@ class DesktopCursorClient;
class DesktopDispatcherClient;
class FocusManager;
namespace client {
+class DefaultCaptureClient;
class ScreenPositionClient;
}
namespace shared {
@@ -25,7 +26,6 @@ class InputMethodEventFilter;
}
namespace views {
-class DesktopCaptureClient;
class HWNDMessageHandler;
class VIEWS_EXPORT DesktopRootWindowHostWin
@@ -208,7 +208,7 @@ class VIEWS_EXPORT DesktopRootWindowHostWin
aura::RootWindow* root_window_;
scoped_ptr<HWNDMessageHandler> message_handler_;
- scoped_ptr<DesktopCaptureClient> capture_client_;
+ scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
scoped_ptr<aura::DesktopDispatcherClient> dispatcher_client_;
scoped_ptr<aura::FocusManager> focus_manager_;
// Depends on focus_manager_.