summaryrefslogtreecommitdiffstats
path: root/ui/views/widget
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 05:04:09 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 05:04:09 +0000
commit458b365cd2b16aa7a7f5191a0040edd45b51a4d4 (patch)
treed618c03fbbf35d6a9776550943a393ffae3e389e /ui/views/widget
parentc6d03e02eccce9fc604f4803d8a073dbe29d5981 (diff)
downloadchromium_src-458b365cd2b16aa7a7f5191a0040edd45b51a4d4.zip
chromium_src-458b365cd2b16aa7a7f5191a0040edd45b51a4d4.tar.gz
chromium_src-458b365cd2b16aa7a7f5191a0040edd45b51a4d4.tar.bz2
Rename WindowDragDropDelegate->DragDropDelegate
Move D&D client stuff into client namespace. Provide some convenient getters/setters. BUG=none TEST=existing automation TBR=sky Review URL: http://codereview.chromium.org/8949010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114595 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/widget')
-rw-r--r--ui/views/widget/native_widget_aura.cc11
-rw-r--r--ui/views/widget/native_widget_aura.h6
2 files changed, 6 insertions, 11 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 7d5629a..89e75ca 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -184,8 +184,7 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
drop_helper_.reset(new DropHelper(GetWidget()->GetRootView()));
if (params.type != Widget::InitParams::TYPE_TOOLTIP &&
params.type != Widget::InitParams::TYPE_POPUP) {
- window_->SetProperty(aura::kDragDropDelegateKey,
- static_cast<aura::WindowDragDropDelegate*>(this));
+ aura::client::SetDragDropDelegate(window_, this);
}
aura::ActivationDelegate::SetActivationDelegate(window_, this);
@@ -510,11 +509,8 @@ bool NativeWidgetAura::IsAccessibleWidget() const {
void NativeWidgetAura::RunShellDrag(View* view,
const ui::OSExchangeData& data,
int operation) {
- aura::DragDropClient* client = static_cast<aura::DragDropClient*>(
- aura::RootWindow::GetInstance()->GetProperty(
- aura::kRootWindowDragDropClientKey));
- if (client)
- client->StartDragAndDrop(data, operation);
+ if (aura::client::GetDragDropClient())
+ aura::client::GetDragDropClient()->StartDragAndDrop(data, operation);
}
void NativeWidgetAura::SchedulePaintInRect(const gfx::Rect& rect) {
@@ -681,7 +677,6 @@ void NativeWidgetAura::OnPaint(gfx::Canvas* canvas) {
}
void NativeWidgetAura::OnWindowDestroying() {
- window_->SetProperty(aura::kDragDropDelegateKey, NULL);
delegate_->OnNativeWidgetDestroying();
// If the aura::Window is destroyed, we can no longer show tooltips.
diff --git a/ui/views/widget/native_widget_aura.h b/ui/views/widget/native_widget_aura.h
index 45cbf74..89676a3 100644
--- a/ui/views/widget/native_widget_aura.h
+++ b/ui/views/widget/native_widget_aura.h
@@ -9,7 +9,7 @@
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "ui/aura/client/activation_delegate.h"
-#include "ui/aura/client/window_drag_drop_delegate.h"
+#include "ui/aura/client/drag_drop_delegate.h"
#include "ui/aura/window_delegate.h"
#include "ui/base/events.h"
#include "ui/views/views_export.h"
@@ -30,7 +30,7 @@ class TooltipManagerAura;
class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate,
public aura::WindowDelegate,
public aura::ActivationDelegate,
- public aura::WindowDragDropDelegate {
+ public aura::client::DragDropDelegate {
public:
explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate);
virtual ~NativeWidgetAura();
@@ -145,7 +145,7 @@ class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate,
virtual void OnActivated() OVERRIDE;
virtual void OnLostActive() OVERRIDE;
- // Overridden from aura::WindowDragDropDelegate:
+ // Overridden from aura::client::DragDropDelegate:
virtual void OnDragEntered(const aura::DropTargetEvent& event) OVERRIDE;
virtual int OnDragUpdated(const aura::DropTargetEvent& event) OVERRIDE;
virtual void OnDragExited() OVERRIDE;