diff options
Diffstat (limited to 'ui/views/widget')
-rw-r--r-- | ui/views/widget/desktop_aura/desktop_native_widget_aura.cc | 25 | ||||
-rw-r--r-- | ui/views/widget/desktop_aura/desktop_native_widget_aura.h | 4 | ||||
-rw-r--r-- | ui/views/widget/native_widget_aura.cc | 12 | ||||
-rw-r--r-- | ui/views/widget/widget_unittest.cc | 7 |
4 files changed, 26 insertions, 22 deletions
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc index f912a67..8726248 100644 --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc @@ -9,7 +9,7 @@ #include "ui/aura/client/aura_constants.h" #include "ui/aura/client/cursor_client.h" #include "ui/aura/client/focus_client.h" -#include "ui/aura/client/stacking_client.h" +#include "ui/aura/client/window_tree_client.h" #include "ui/aura/root_window.h" #include "ui/aura/root_window_host.h" #include "ui/aura/window.h" @@ -132,18 +132,19 @@ class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver { DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetTopLevelHandler); }; -class DesktopNativeWidgetAuraStackingClient : - public aura::client::StackingClient { +class DesktopNativeWidgetAuraWindowTreeClient : + public aura::client::WindowTreeClient { public: - explicit DesktopNativeWidgetAuraStackingClient(aura::RootWindow* root_window) + explicit DesktopNativeWidgetAuraWindowTreeClient( + aura::RootWindow* root_window) : root_window_(root_window) { - aura::client::SetStackingClient(root_window_, this); + aura::client::SetWindowTreeClient(root_window_, this); } - virtual ~DesktopNativeWidgetAuraStackingClient() { - aura::client::SetStackingClient(root_window_, NULL); + virtual ~DesktopNativeWidgetAuraWindowTreeClient() { + aura::client::SetWindowTreeClient(root_window_, NULL); } - // Overridden from client::StackingClient: + // Overridden from client::WindowTreeClient: virtual aura::Window* GetDefaultParent(aura::Window* context, aura::Window* window, const gfx::Rect& bounds) OVERRIDE { @@ -166,7 +167,7 @@ class DesktopNativeWidgetAuraStackingClient : private: aura::RootWindow* root_window_; - DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAuraStackingClient); + DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAuraWindowTreeClient); }; } // namespace @@ -232,7 +233,7 @@ void DesktopNativeWidgetAura::OnHostClosed() { root_window_event_filter_->RemoveHandler(input_method_event_filter_.get()); - stacking_client_.reset(); // Uses root_window_ at destruction. + window_tree_client_.reset(); // Uses root_window_ at destruction. capture_client_.reset(); // Uses root_window_ at destruction. @@ -352,8 +353,8 @@ void DesktopNativeWidgetAura::InitNativeWidget( root_window_->AddRootWindowObserver(this); - stacking_client_.reset( - new DesktopNativeWidgetAuraStackingClient(root_window_.get())); + window_tree_client_.reset( + new DesktopNativeWidgetAuraWindowTreeClient(root_window_.get())); drop_helper_.reset(new DropHelper( static_cast<internal::RootView*>(GetWidget()->GetRootView()))); aura::client::SetDragDropDelegate(content_window_, this); diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h index c07ede9..6c484ef 100644 --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.h +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.h @@ -19,7 +19,7 @@ namespace aura { class RootWindow; namespace client { -class StackingClient; +class WindowTreeClient; } } @@ -258,7 +258,7 @@ class VIEWS_EXPORT DesktopNativeWidgetAura internal::NativeWidgetDelegate* native_widget_delegate_; - scoped_ptr<aura::client::StackingClient> stacking_client_; + scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; // Toplevel event filter which dispatches to other event filters. corewm::CompoundEventFilter* root_window_event_filter_; diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc index cfba08a..8366092 100644 --- a/ui/views/widget/native_widget_aura.cc +++ b/ui/views/widget/native_widget_aura.cc @@ -13,8 +13,8 @@ #include "ui/aura/client/drag_drop_client.h" #include "ui/aura/client/focus_client.h" #include "ui/aura/client/screen_position_client.h" -#include "ui/aura/client/stacking_client.h" #include "ui/aura/client/window_move_client.h" +#include "ui/aura/client/window_tree_client.h" #include "ui/aura/client/window_types.h" #include "ui/aura/env.h" #include "ui/aura/root_window.h" @@ -152,8 +152,8 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { if (parent) { parent->AddChild(window_); } else { - window_->SetDefaultParentByRootWindow(context->GetRootWindow(), - window_bounds); + aura::client::ParentWindowWithContext( + window_, context->GetRootWindow(), window_bounds); } // Wait to set the bounds until we have a parent. That way we can know our @@ -1109,7 +1109,7 @@ void NativeWidgetPrivate::ReparentNativeView(gfx::NativeView native_view, } else { // The following looks weird, but it's the equivalent of what aura has // always done. (The previous behaviour of aura::Window::SetParent() used - // NULL as a special value that meant ask the StackingClient where things + // NULL as a special value that meant ask the WindowTreeClient where things // should go.) // // This probably isn't strictly correct, but its an invariant that a Window @@ -1119,8 +1119,8 @@ void NativeWidgetPrivate::ReparentNativeView(gfx::NativeView native_view, // matches our previous behaviour; the global stacking client would almost // always reattach the window to the same RootWindow. aura::RootWindow* root_window = native_view->GetRootWindow(); - native_view->SetDefaultParentByRootWindow( - root_window, root_window->GetBoundsInScreen()); + aura::client::ParentWindowWithContext( + native_view, root_window, root_window->GetBoundsInScreen()); } // And now, notify them that they have a brand new parent. diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc index bb6c00f..dcc4f0d 100644 --- a/ui/views/widget/widget_unittest.cc +++ b/ui/views/widget/widget_unittest.cc @@ -27,6 +27,7 @@ #if defined(USE_AURA) #include "ui/aura/client/aura_constants.h" +#include "ui/aura/client/window_tree_client.h" #include "ui/aura/root_window.h" #include "ui/aura/test/test_window_delegate.h" #include "ui/aura/window.h" @@ -1142,8 +1143,10 @@ class DesktopAuraTopLevelWindowTest owned_window_->SetType(aura::client::WINDOW_TYPE_MENU); } owned_window_->Init(ui::LAYER_TEXTURED); - owned_window_->SetDefaultParentByRootWindow( - widget_.GetNativeView()->GetRootWindow(), gfx::Rect(0, 0, 1900, 1600)); + aura::client::ParentWindowWithContext( + owned_window_, + widget_.GetNativeView()->GetRootWindow(), + gfx::Rect(0, 0, 1900, 1600)); owned_window_->Show(); owned_window_->AddObserver(this); |