diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-09 22:48:57 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-09 22:48:57 +0000 |
commit | 9823481646ee68ca96b77099ba3ebc12ade27f58 (patch) | |
tree | 909b6ea3b680656d27b19d049d9a816911100106 | |
parent | 82987d6363d1a724b12575a9167752ad3baa3e27 (diff) | |
download | chromium_src-9823481646ee68ca96b77099ba3ebc12ade27f58.zip chromium_src-9823481646ee68ca96b77099ba3ebc12ade27f58.tar.gz chromium_src-9823481646ee68ca96b77099ba3ebc12ade27f58.tar.bz2 |
Create a new aura client API dir and move constants and desktop delegate to it.
Rename DesktopDelegate to StackingClient.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8508020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109323 0039d316-1c4b-4281-b951-d872f2087c98
35 files changed, 94 insertions, 97 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 86cbfd2..69ff5e4 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -11,7 +11,7 @@ #include "content/public/browser/native_web_keyboard_event.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/desktop.h" #include "ui/aura/event.h" #include "ui/aura/window.h" diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp index 3a31af9..144069c 100644 --- a/ui/aura/aura.gyp +++ b/ui/aura/aura.gyp @@ -23,10 +23,11 @@ 'AURA_IMPLEMENTATION', ], 'sources': [ - 'aura_constants.cc', - 'aura_constants.h', 'aura_switches.cc', 'aura_switches.h', + 'client/aura_constants.cc', + 'client/aura_constants.h', + 'client/stacking_client.h', 'cursor.h', 'desktop_host.h', 'desktop_host_linux.cc', @@ -34,7 +35,6 @@ 'desktop_host_win.h', 'desktop.cc', 'desktop.h', - 'desktop_delegate.h', 'event.cc', 'event.h', 'event_filter.cc', @@ -71,8 +71,8 @@ 'test/aura_test_base.h', 'test/event_generator.cc', 'test/event_generator.h', - 'test/test_desktop_delegate.cc', - 'test/test_desktop_delegate.h', + 'test/test_stacking_client.cc', + 'test/test_stacking_client.h', 'test/test_window_delegate.cc', 'test/test_window_delegate.h', ], diff --git a/ui/aura/aura_constants.cc b/ui/aura/client/aura_constants.cc index c6e5235..fb6aa65 100644 --- a/ui/aura/aura_constants.cc +++ b/ui/aura/client/aura_constants.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/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" namespace aura { diff --git a/ui/aura/aura_constants.h b/ui/aura/client/aura_constants.h index 66a6911..1c7def54 100644 --- a/ui/aura/aura_constants.h +++ b/ui/aura/client/aura_constants.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_AURA_AURA_CONSTANTS_H_ -#define UI_AURA_AURA_CONSTANTS_H_ +#ifndef UI_AURA_CLIENT_AURA_CONSTANTS_H_ +#define UI_AURA_CLIENT_AURA_CONSTANTS_H_ #pragma once #include "ui/aura/aura_export.h" @@ -25,4 +25,4 @@ AURA_EXPORT extern const char* kTooltipTextKey; } // namespace aura -#endif // UI_AURA_AURA_CONSTANTS_H_ +#endif // UI_AURA_CLIENT_AURA_CONSTANTS_H_ diff --git a/ui/aura/desktop_delegate.h b/ui/aura/client/stacking_client.h index 5438533..c56e319 100644 --- a/ui/aura/desktop_delegate.h +++ b/ui/aura/client/stacking_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_AURA_DESKTOP_DELEGATE_H_ -#define UI_AURA_DESKTOP_DELEGATE_H_ +#ifndef UI_AURA_CLIENT_STACKING_CLIENT_H_ +#define UI_AURA_CLIENT_STACKING_CLIENT_H_ #pragma once #include "ui/aura/aura_export.h" @@ -12,9 +12,10 @@ namespace aura { class Window; -class AURA_EXPORT DesktopDelegate { +// An interface implemented by an object that stacks windows. +class AURA_EXPORT StackingClient { public: - virtual ~DesktopDelegate() {} + virtual ~StackingClient() {} // Called by the Window when its parent is set to NULL. The delegate is given // an opportunity to inspect the window and add it to a default parent window @@ -27,4 +28,4 @@ class AURA_EXPORT DesktopDelegate { } // namespace aura -#endif // UI_AURA_DESKTOP_DELEGATE_H_ +#endif // UI_AURA_CLIENT_STACKING_CLIENT_H_ diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc index cdef3e2..36b9e2d 100644 --- a/ui/aura/desktop.cc +++ b/ui/aura/desktop.cc @@ -14,7 +14,7 @@ #include "base/string_number_conversions.h" #include "base/string_split.h" #include "ui/aura/aura_switches.h" -#include "ui/aura/desktop_delegate.h" +#include "ui/aura/client/stacking_client.h" #include "ui/aura/desktop_host.h" #include "ui/aura/desktop_observer.h" #include "ui/aura/event.h" @@ -76,10 +76,10 @@ bool IsNonClientLocation(Window* target, const gfx::Point& location) { return hit_test_code != HTCLIENT && hit_test_code != HTNOWHERE; } -class DefaultDesktopDelegate : public DesktopDelegate { +class DefaultStackingClient : public StackingClient { public: - explicit DefaultDesktopDelegate(Desktop* desktop) : desktop_(desktop) {} - virtual ~DefaultDesktopDelegate() {} + explicit DefaultStackingClient(Desktop* desktop) : desktop_(desktop) {} + virtual ~DefaultStackingClient() {} private: virtual void AddChildToDefaultParent(Window* window) OVERRIDE { @@ -100,7 +100,7 @@ class DefaultDesktopDelegate : public DesktopDelegate { Desktop* desktop_; - DISALLOW_COPY_AND_ASSIGN(DefaultDesktopDelegate); + DISALLOW_COPY_AND_ASSIGN(DefaultStackingClient); }; class DesktopEventFilter : public EventFilter { @@ -240,7 +240,7 @@ Desktop::Desktop() : Window(NULL), host_(aura::DesktopHost::Create(GetInitialHostWindowBounds())), ALLOW_THIS_IN_INITIALIZER_LIST( - delegate_(new DefaultDesktopDelegate(this))), + stacking_client_(new DefaultStackingClient(this))), ALLOW_THIS_IN_INITIALIZER_LIST(schedule_paint_factory_(this)), active_window_(NULL), last_cursor_(kCursorNull), @@ -287,8 +287,8 @@ void Desktop::DeleteInstanceForTesting() { instance_ = NULL; } -void Desktop::SetDelegate(DesktopDelegate* delegate) { - delegate_.reset(delegate); +void Desktop::SetStackingClient(StackingClient* stacking_client) { + stacking_client_.reset(stacking_client); } void Desktop::ShowDesktop() { @@ -433,7 +433,7 @@ void Desktop::SetActiveWindow(Window* window, Window* to_focus) { } void Desktop::ActivateTopmostWindow() { - SetActiveWindow(delegate_->GetTopmostWindowToActivate(NULL), NULL); + SetActiveWindow(stacking_client_->GetTopmostWindowToActivate(NULL), NULL); } void Desktop::Deactivate(Window* window) { @@ -448,7 +448,7 @@ void Desktop::Deactivate(Window* window) { return; // Top level ancestor is already not active. Window* to_activate = - delegate_->GetTopmostWindowToActivate(toplevel_ancestor); + stacking_client_->GetTopmostWindowToActivate(toplevel_ancestor); if (to_activate) SetActiveWindow(to_activate, NULL); } @@ -476,7 +476,7 @@ void Desktop::WindowDestroying(Window* window) { // Reset active_window_ before invoking SetActiveWindow so that we don't // attempt to notify it while running its destructor. active_window_ = NULL; - SetActiveWindow(delegate_->GetTopmostWindowToActivate(window), NULL); + SetActiveWindow(stacking_client_->GetTopmostWindowToActivate(window), NULL); } MessageLoop::Dispatcher* Desktop::GetDispatcher() { diff --git a/ui/aura/desktop.h b/ui/aura/desktop.h index 579c2d7..003985c 100644 --- a/ui/aura/desktop.h +++ b/ui/aura/desktop.h @@ -32,12 +32,12 @@ class Transform; namespace aura { -class DesktopDelegate; class DesktopHost; class DesktopObserver; class KeyEvent; class MouseEvent; class ScreenAura; +class StackingClient; class TouchEvent; // Desktop is responsible for hosting a set of windows. @@ -59,13 +59,13 @@ class AURA_EXPORT Desktop : public ui::CompositorDelegate, ui::Compositor* compositor() { return compositor_.get(); } gfx::Point last_mouse_location() const { return last_mouse_location_; } gfx::NativeCursor last_cursor() const { return last_cursor_; } - DesktopDelegate* delegate() { return delegate_.get(); } + StackingClient* stacking_client() { return stacking_client_.get(); } Window* active_window() { return active_window_; } Window* mouse_pressed_handler() { return mouse_pressed_handler_; } Window* capture_window() { return capture_window_; } ScreenAura* screen() { return screen_; } - void SetDelegate(DesktopDelegate* delegate); + void SetStackingClient(StackingClient* stacking_client); // Shows the desktop host. void ShowDesktop(); @@ -173,7 +173,7 @@ class AURA_EXPORT Desktop : public ui::CompositorDelegate, scoped_ptr<DesktopHost> host_; - scoped_ptr<DesktopDelegate> delegate_; + scoped_ptr<StackingClient> stacking_client_; static Desktop* instance_; diff --git a/ui/aura/event_filter_unittest.cc b/ui/aura/event_filter_unittest.cc index 7c08c7e..03f01db 100644 --- a/ui/aura/event_filter_unittest.cc +++ b/ui/aura/event_filter_unittest.cc @@ -10,7 +10,6 @@ #include "ui/aura/event.h" #include "ui/aura/test/aura_test_base.h" #include "ui/aura/test/event_generator.h" -#include "ui/aura/test/test_desktop_delegate.h" #include "ui/aura/test/test_window_delegate.h" #if defined(OS_WIN) diff --git a/ui/aura/test/aura_test_base.cc b/ui/aura/test/aura_test_base.cc index b14c0cd..8d7a7bc 100644 --- a/ui/aura/test/aura_test_base.cc +++ b/ui/aura/test/aura_test_base.cc @@ -9,7 +9,7 @@ #endif #include "ui/aura/desktop.h" -#include "ui/aura/test/test_desktop_delegate.h" +#include "ui/aura/test/test_stacking_client.h" namespace aura { namespace test { @@ -21,8 +21,8 @@ AuraTestBase::AuraTestBase() OleInitialize(NULL); #endif - // TestDesktopDelegate is owned by the desktop. - new TestDesktopDelegate(); + // TestStackingClient is owned by the desktop. + new TestStackingClient(); Desktop::GetInstance()->Show(); Desktop::GetInstance()->SetHostSize(gfx::Size(600, 600)); } @@ -46,9 +46,9 @@ AuraTestBase::~AuraTestBase() { aura::Desktop::DeleteInstanceForTesting(); } -TestDesktopDelegate* AuraTestBase::GetTestDesktopDelegate() { - return static_cast<TestDesktopDelegate*>( - aura::Desktop::GetInstance()->delegate()); +TestStackingClient* AuraTestBase::GetTestStackingClient() { + return static_cast<TestStackingClient*>( + aura::Desktop::GetInstance()->stacking_client()); } void AuraTestBase::SetUp() { diff --git a/ui/aura/test/aura_test_base.h b/ui/aura/test/aura_test_base.h index 6c9d3ff..bea5a75 100644 --- a/ui/aura/test/aura_test_base.h +++ b/ui/aura/test/aura_test_base.h @@ -14,7 +14,7 @@ namespace aura { namespace test { -class TestDesktopDelegate; +class TestStackingClient; // A base class for aura unit tests. class AuraTestBase : public testing::Test { @@ -22,7 +22,7 @@ class AuraTestBase : public testing::Test { AuraTestBase(); virtual ~AuraTestBase(); - TestDesktopDelegate* GetTestDesktopDelegate(); + TestStackingClient* GetTestStackingClient(); // testing::Test: virtual void SetUp() OVERRIDE; diff --git a/ui/aura/test/test_desktop_delegate.cc b/ui/aura/test/test_stacking_client.cc index 251d241..37ce262 100644 --- a/ui/aura/test/test_desktop_delegate.cc +++ b/ui/aura/test/test_stacking_client.cc @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/aura/test/test_desktop_delegate.h" +#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/desktop.h" namespace aura { namespace test { -TestDesktopDelegate::TestDesktopDelegate() +TestStackingClient::TestStackingClient() : default_container_(new ToplevelWindowContainer) { - Desktop::GetInstance()->SetDelegate(this); + Desktop::GetInstance()->SetStackingClient(this); default_container_->Init(ui::Layer::LAYER_HAS_NO_TEXTURE); default_container_->SetBounds( gfx::Rect(gfx::Point(), Desktop::GetInstance()->GetHostSize())); @@ -19,14 +19,14 @@ TestDesktopDelegate::TestDesktopDelegate() default_container_->Show(); } -TestDesktopDelegate::~TestDesktopDelegate() { +TestStackingClient::~TestStackingClient() { } -void TestDesktopDelegate::AddChildToDefaultParent(Window* window) { +void TestStackingClient::AddChildToDefaultParent(Window* window) { default_container_->AddChild(window); } -Window* TestDesktopDelegate::GetTopmostWindowToActivate(Window* ignore) const { +Window* TestStackingClient::GetTopmostWindowToActivate(Window* ignore) const { return default_container_->GetTopmostWindowToActivate(ignore); } diff --git a/ui/aura/test/test_desktop_delegate.h b/ui/aura/test/test_stacking_client.h index 09bfc31e..bf77ff8 100644 --- a/ui/aura/test/test_desktop_delegate.h +++ b/ui/aura/test/test_stacking_client.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_AURA_TEST_TEST_DESKTOP_DELEGATE_H_ -#define UI_AURA_TEST_TEST_DESKTOP_DELEGATE_H_ +#ifndef UI_AURA_TEST_TEST_STACKING_CLIENT_H_ +#define UI_AURA_TEST_TEST_STACKING_CLIENT_H_ #pragma once #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" -#include "ui/aura/desktop_delegate.h" +#include "ui/aura/client/stacking_client.h" #include "ui/aura/toplevel_window_container.h" namespace aura { @@ -17,27 +17,27 @@ class ToplevelWindowContainer; namespace test { -class TestDesktopDelegate : public DesktopDelegate { +class TestStackingClient : public StackingClient { public: - // Callers should allocate a TestDesktopDelegate on the heap and then forget - // about it -- the c'tor passes ownership of the TestDesktopDelegate to the + // Callers should allocate a TestStackingClient on the heap and then forget + // about it -- the c'tor passes ownership of the TestStackingClient to the // static Desktop object. - TestDesktopDelegate(); - virtual ~TestDesktopDelegate(); + TestStackingClient(); + virtual ~TestStackingClient(); Window* default_container() { return default_container_.get(); } private: - // Overridden from DesktopDelegate: + // Overridden from StackingClient: virtual void AddChildToDefaultParent(Window* window) OVERRIDE; virtual Window* GetTopmostWindowToActivate(Window* ignore) const OVERRIDE; scoped_ptr<ToplevelWindowContainer> default_container_; - DISALLOW_COPY_AND_ASSIGN(TestDesktopDelegate); + DISALLOW_COPY_AND_ASSIGN(TestStackingClient); }; } // namespace test } // namespace aura -#endif // UI_AURA_TEST_TEST_DESKTOP_DELEGATE_H_ +#endif // UI_AURA_TEST_TEST_STACKING_CLIENT_H_ diff --git a/ui/aura/test/test_window_delegate.h b/ui/aura/test/test_window_delegate.h index 9fcb170..4150f67 100644 --- a/ui/aura/test/test_window_delegate.h +++ b/ui/aura/test/test_window_delegate.h @@ -7,14 +7,13 @@ #pragma once #include "base/compiler_specific.h" -#include "ui/aura/aura_export.h" #include "ui/aura/window_delegate.h" namespace aura { namespace test { // WindowDelegate implementation with all methods stubbed out. -class AURA_EXPORT TestWindowDelegate : public WindowDelegate { +class TestWindowDelegate : public WindowDelegate { public: TestWindowDelegate(); virtual ~TestWindowDelegate(); diff --git a/ui/aura/window.cc b/ui/aura/window.cc index 8a4fc4d..89ea1fe 100644 --- a/ui/aura/window.cc +++ b/ui/aura/window.cc @@ -8,8 +8,8 @@ #include "base/logging.h" #include "base/stl_util.h" +#include "ui/aura/client/stacking_client.h" #include "ui/aura/desktop.h" -#include "ui/aura/desktop_delegate.h" #include "ui/aura/event.h" #include "ui/aura/event_filter.h" #include "ui/aura/layout_manager.h" @@ -166,8 +166,8 @@ void Window::SetCanvas(const SkCanvas& canvas, const gfx::Point& origin) { void Window::SetParent(Window* parent) { if (parent) parent->AddChild(this); - else if (Desktop::GetInstance()->delegate()) - Desktop::GetInstance()->delegate()->AddChildToDefaultParent(this); + else if (Desktop::GetInstance()->stacking_client()) + Desktop::GetInstance()->stacking_client()->AddChildToDefaultParent(this); else NOTREACHED(); } diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc index b3da954a..707a881 100644 --- a/ui/aura/window_unittest.cc +++ b/ui/aura/window_unittest.cc @@ -14,8 +14,8 @@ #include "ui/aura/focus_manager.h" #include "ui/aura/test/aura_test_base.h" #include "ui/aura/test/event_generator.h" -#include "ui/aura/test/test_desktop_delegate.h" #include "ui/aura/test/test_window_delegate.h" +#include "ui/aura/toplevel_window_container.h" #include "ui/aura/window_delegate.h" #include "ui/aura/window_observer.h" #include "ui/base/hit_test.h" diff --git a/ui/aura_shell/default_container_layout_manager.cc b/ui/aura_shell/default_container_layout_manager.cc index 93a7a78..8deb9fb 100644 --- a/ui/aura_shell/default_container_layout_manager.cc +++ b/ui/aura_shell/default_container_layout_manager.cc @@ -4,7 +4,7 @@ #include "ui/aura_shell/default_container_layout_manager.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/desktop.h" #include "ui/aura/event.h" #include "ui/aura/window.h" diff --git a/ui/aura_shell/default_container_layout_manager_unittest.cc b/ui/aura_shell/default_container_layout_manager_unittest.cc index 2e6837c..9d6ec24 100644 --- a/ui/aura_shell/default_container_layout_manager_unittest.cc +++ b/ui/aura_shell/default_container_layout_manager_unittest.cc @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory/scoped_vector.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/desktop.h" #include "ui/aura/screen_aura.h" #include "ui/aura/test/aura_test_base.h" diff --git a/ui/aura_shell/property_util.cc b/ui/aura_shell/property_util.cc index b5cf34c..9e992fc 100644 --- a/ui/aura_shell/property_util.cc +++ b/ui/aura_shell/property_util.cc @@ -4,7 +4,7 @@ #include "ui/aura_shell/property_util.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/window.h" #include "ui/base/ui_base_types.h" #include "ui/gfx/rect.h" diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc index 187da07..58d3d78f 100644 --- a/ui/aura_shell/shell.cc +++ b/ui/aura_shell/shell.cc @@ -83,7 +83,7 @@ Shell* Shell::instance_ = NULL; Shell::Shell() : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { - aura::Desktop::GetInstance()->SetDelegate(this); + aura::Desktop::GetInstance()->SetStackingClient(this); } Shell::~Shell() { @@ -177,7 +177,7 @@ void Shell::EnableWorkspaceManager() { } //////////////////////////////////////////////////////////////////////////////// -// Shell, aura::DesktopDelegate implementation: +// Shell, aura::StackingClient implementation: void Shell::AddChildToDefaultParent(aura::Window* window) { aura::Window* parent = NULL; diff --git a/ui/aura_shell/shell.h b/ui/aura_shell/shell.h index bc294bb..7021425 100644 --- a/ui/aura_shell/shell.h +++ b/ui/aura_shell/shell.h @@ -14,7 +14,7 @@ #include "base/task.h" #include "base/compiler_specific.h" #include "base/memory/weak_ptr.h" -#include "ui/aura/desktop_delegate.h" +#include "ui/aura/client/stacking_client.h" #include "ui/aura_shell/aura_shell_export.h" namespace aura { @@ -36,7 +36,7 @@ class WorkspaceController; // Shell is a singleton object that presents the Shell API and implements the // Desktop's delegate interface. -class AURA_SHELL_EXPORT Shell : public aura::DesktopDelegate { +class AURA_SHELL_EXPORT Shell : public aura::StackingClient { public: // Upon creation, the Shell sets itself as the Desktop's delegate, which takes // ownership of the Shell. @@ -65,7 +65,7 @@ class AURA_SHELL_EXPORT Shell : public aura::DesktopDelegate { // Enables WorkspaceManager. void EnableWorkspaceManager(); - // Overridden from aura::DesktopDelegate: + // Overridden from aura::StackingClient: virtual void AddChildToDefaultParent(aura::Window* window) OVERRIDE; virtual aura::Window* GetTopmostWindowToActivate( aura::Window* ignore) const OVERRIDE; diff --git a/ui/aura_shell/show_state_controller.cc b/ui/aura_shell/show_state_controller.cc index 5048971..905a8f5 100644 --- a/ui/aura_shell/show_state_controller.cc +++ b/ui/aura_shell/show_state_controller.cc @@ -4,7 +4,7 @@ #include "ui/aura_shell/show_state_controller.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/window.h" #include "ui/aura_shell/property_util.h" #include "ui/aura_shell/workspace/workspace.h" diff --git a/ui/aura_shell/toplevel_layout_manager.cc b/ui/aura_shell/toplevel_layout_manager.cc index 65ff83e..4a06d14 100644 --- a/ui/aura_shell/toplevel_layout_manager.cc +++ b/ui/aura_shell/toplevel_layout_manager.cc @@ -4,7 +4,7 @@ #include "ui/aura_shell/toplevel_layout_manager.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/window.h" #include "ui/aura_shell/property_util.h" #include "ui/aura_shell/shelf_layout_controller.h" diff --git a/ui/aura_shell/toplevel_layout_manager_unittest.cc b/ui/aura_shell/toplevel_layout_manager_unittest.cc index 8dd9b5a..79d9b88 100644 --- a/ui/aura_shell/toplevel_layout_manager_unittest.cc +++ b/ui/aura_shell/toplevel_layout_manager_unittest.cc @@ -6,7 +6,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/desktop.h" #include "ui/aura/screen_aura.h" #include "ui/aura/test/aura_test_base.h" diff --git a/ui/aura_shell/toplevel_window_event_filter.cc b/ui/aura_shell/toplevel_window_event_filter.cc index 0cf4106..e8609b4 100644 --- a/ui/aura_shell/toplevel_window_event_filter.cc +++ b/ui/aura_shell/toplevel_window_event_filter.cc @@ -4,7 +4,7 @@ #include "ui/aura_shell/toplevel_window_event_filter.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/cursor.h" #include "ui/aura/desktop.h" #include "ui/aura/event.h" diff --git a/ui/aura_shell/toplevel_window_event_filter_unittest.cc b/ui/aura_shell/toplevel_window_event_filter_unittest.cc index 3dc4dea..5983699 100644 --- a/ui/aura_shell/toplevel_window_event_filter_unittest.cc +++ b/ui/aura_shell/toplevel_window_event_filter_unittest.cc @@ -9,7 +9,7 @@ #include "ui/aura/event.h" #include "ui/aura/test/aura_test_base.h" #include "ui/aura/test/event_generator.h" -#include "ui/aura/test/test_desktop_delegate.h" +#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/test/test_window_delegate.h" #include "ui/aura_shell/toplevel_window_event_filter.h" #include "ui/base/hit_test.h" @@ -59,8 +59,9 @@ class ToplevelWindowEventFilterTest : public aura::test::AuraTestBase { virtual void SetUp() OVERRIDE { aura::test::AuraTestBase::SetUp(); aura::Window* default_container = - static_cast<aura::test::TestDesktopDelegate*>( - aura::Desktop::GetInstance()->delegate())->default_container(); + static_cast<aura::test::TestStackingClient*>( + aura::Desktop::GetInstance()->stacking_client())-> + default_container(); default_container->SetEventFilter( new ToplevelWindowEventFilter(default_container)); } diff --git a/ui/aura_shell/workspace/workspace.cc b/ui/aura_shell/workspace/workspace.cc index 635a42a..ebe2bd1 100644 --- a/ui/aura_shell/workspace/workspace.cc +++ b/ui/aura_shell/workspace/workspace.cc @@ -7,7 +7,7 @@ #include <algorithm> #include "base/logging.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/desktop.h" #include "ui/aura/window.h" #include "ui/aura_shell/property_util.h" diff --git a/ui/aura_shell/workspace/workspace_manager_unittest.cc b/ui/aura_shell/workspace/workspace_manager_unittest.cc index eca5637..7ac6007 100644 --- a/ui/aura_shell/workspace/workspace_manager_unittest.cc +++ b/ui/aura_shell/workspace/workspace_manager_unittest.cc @@ -4,11 +4,11 @@ #include "ui/aura_shell/workspace/workspace_manager.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/desktop.h" #include "ui/aura/screen_aura.h" #include "ui/aura/test/aura_test_base.h" -#include "ui/aura/test/test_desktop_delegate.h" +#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/window.h" #include "ui/aura_shell/workspace/workspace.h" #include "ui/aura_shell/workspace/workspace_observer.h" @@ -97,7 +97,7 @@ class WorkspaceManagerTestBase : public aura::test::AuraTestBase { } aura::Window* viewport() { - return GetTestDesktopDelegate()->default_container(); + return GetTestStackingClient()->default_container(); } scoped_ptr<WorkspaceManager> manager_; diff --git a/ui/aura_shell/workspace_controller_unittest.cc b/ui/aura_shell/workspace_controller_unittest.cc index 49050e1..6f3241b 100644 --- a/ui/aura_shell/workspace_controller_unittest.cc +++ b/ui/aura_shell/workspace_controller_unittest.cc @@ -5,7 +5,7 @@ #include "ui/aura_shell/workspace_controller.h" #include "ui/aura/test/aura_test_base.h" -#include "ui/aura/test/test_desktop_delegate.h" +#include "ui/aura/test/test_stacking_client.h" #include "ui/aura/window.h" #include "ui/aura_shell/workspace/workspace.h" #include "ui/aura_shell/workspace/workspace_manager.h" @@ -22,7 +22,7 @@ class WorkspaceControllerTest : public aura::test::AuraTestBase { virtual void SetUp() OVERRIDE { aura::test::AuraTestBase::SetUp(); - contents_view_ = GetTestDesktopDelegate()->default_container(); + contents_view_ = GetTestStackingClient()->default_container(); controller_.reset(new WorkspaceController(contents_view_)); } @@ -87,7 +87,7 @@ TEST_F(WorkspaceControllerTest, Overview) { EXPECT_EQ(ws1, workspace_manager()->GetActiveWorkspace()); EXPECT_FALSE(workspace_manager()->is_overview()); - // Deleting w1 without DesktopDelegate resets the active workspace + // Deleting w1 without StackingClient resets the active workspace ws1->RemoveWindow(w1.get()); delete ws1; w1.reset(); diff --git a/ui/gfx/compositor/layer_animation_element.h b/ui/gfx/compositor/layer_animation_element.h index c059f16..2dabd90 100644 --- a/ui/gfx/compositor/layer_animation_element.h +++ b/ui/gfx/compositor/layer_animation_element.h @@ -29,7 +29,7 @@ class COMPOSITOR_EXPORT LayerAnimationElement { OPACITY }; - struct TargetValue { + struct COMPOSITOR_EXPORT TargetValue { TargetValue(); // Initializes the target value to match the delegate. NULL may be supplied. explicit TargetValue(const LayerAnimationDelegate* delegate); diff --git a/ui/gfx/compositor/test_layer_animation_delegate.h b/ui/gfx/compositor/test_layer_animation_delegate.h index c75d2b1..24df272 100644 --- a/ui/gfx/compositor/test_layer_animation_delegate.h +++ b/ui/gfx/compositor/test_layer_animation_delegate.h @@ -9,15 +9,13 @@ #include "base/compiler_specific.h" #include "ui/gfx/rect.h" #include "ui/gfx/transform.h" -#include "ui/gfx/compositor/compositor_export.h" #include "ui/gfx/compositor/layer_animation_delegate.h" namespace ui { class LayerAnimationSequence; -class COMPOSITOR_EXPORT TestLayerAnimationDelegate - : public LayerAnimationDelegate { +class TestLayerAnimationDelegate : public LayerAnimationDelegate { public: TestLayerAnimationDelegate(); TestLayerAnimationDelegate(const LayerAnimationDelegate& other); diff --git a/ui/gfx/compositor/test_layer_animation_observer.h b/ui/gfx/compositor/test_layer_animation_observer.h index 879c74b..d0d6df3 100644 --- a/ui/gfx/compositor/test_layer_animation_observer.h +++ b/ui/gfx/compositor/test_layer_animation_observer.h @@ -7,7 +7,6 @@ #pragma once #include "base/compiler_specific.h" -#include "ui/gfx/compositor/compositor_export.h" #include "ui/gfx/compositor/layer_animation_observer.h" namespace ui { @@ -16,8 +15,7 @@ class LayerAnimationSequence; // Listens to animation ended notifications. Remembers the last sequence that // it was notified about. -class COMPOSITOR_EXPORT TestLayerAnimationObserver - : public LayerAnimationObserver { +class TestLayerAnimationObserver : public LayerAnimationObserver { public: TestLayerAnimationObserver(); virtual ~TestLayerAnimationObserver(); diff --git a/views/test/views_test_base.cc b/views/test/views_test_base.cc index 0a3568a..c4db9c0 100644 --- a/views/test/views_test_base.cc +++ b/views/test/views_test_base.cc @@ -10,7 +10,7 @@ #if defined(USE_AURA) #include "ui/aura/desktop.h" -#include "ui/aura/test/test_desktop_delegate.h" +#include "ui/aura/test/test_stacking_client.h" #endif namespace views { @@ -22,7 +22,7 @@ ViewsTestBase::ViewsTestBase() OleInitialize(NULL); #endif #if defined(USE_AURA) - new aura::test::TestDesktopDelegate; + new aura::test::TestStackingClient; #endif } diff --git a/views/views.gyp b/views/views.gyp index e72e5be..805da08 100644 --- a/views/views.gyp +++ b/views/views.gyp @@ -607,8 +607,6 @@ 'widget/native_widget_unittest.cc', 'widget/native_widget_win_unittest.cc', 'widget/widget_unittest.cc', - '../ui/aura/test/test_desktop_delegate.cc', - '../ui/aura/test/test_desktop_delegate.h', '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc', @@ -656,6 +654,9 @@ ], }], [ 'use_aura==1', { + 'dependencies': [ + '../ui/aura/aura.gyp:test_support_aura', + ], 'sources/': [ ['exclude', 'focus/focus_manager_unittest.cc'], # TODO(beng): ['exclude', 'widget/native_widget_win_unittest.cc'], diff --git a/views/widget/native_widget_aura.cc b/views/widget/native_widget_aura.cc index d8358ee..527e257 100644 --- a/views/widget/native_widget_aura.cc +++ b/views/widget/native_widget_aura.cc @@ -5,7 +5,7 @@ #include "views/widget/native_widget_aura.h" #include "base/bind.h" -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/desktop.h" #include "ui/aura/desktop_observer.h" #include "ui/aura/event.h" diff --git a/views/widget/tooltip_manager_views.cc b/views/widget/tooltip_manager_views.cc index 8793646..d038dd8 100644 --- a/views/widget/tooltip_manager_views.cc +++ b/views/widget/tooltip_manager_views.cc @@ -18,7 +18,7 @@ #include "base/utf_string_conversions.h" #include "third_party/skia/include/core/SkColor.h" #if defined(USE_AURA) -#include "ui/aura/aura_constants.h" +#include "ui/aura/client/aura_constants.h" #include "ui/aura/event.h" #include "ui/aura/window.h" #endif |