Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2721)

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_x11.h

Issue 14189002: linux_aura: Implement dropping in chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
index e2a936e238332ebf059e4de0e87595091e3a696f..3b7fad59ea4b6b425d7af25df6f9e6ff4ec19574 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.h
@@ -15,6 +15,7 @@
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/root_window_host.h"
#include "ui/base/cursor/cursor_loader_x11.h"
+#include "ui/base/dragdrop/desktop_selection_provider_aurax11.h"
#include "ui/base/x/x11_atom_cache.h"
#include "ui/gfx/rect.h"
#include "ui/views/views_export.h"
@@ -30,6 +31,7 @@ class ScreenPositionClient;
namespace views {
class DesktopActivationClient;
class DesktopCaptureClient;
+class DesktopDragDropClientAuraX11;
class DesktopDispatcherClient;
class X11DesktopWindowMoveClient;
class X11WindowEventFilter;
@@ -41,6 +43,7 @@ class CursorManager;
class VIEWS_EXPORT DesktopRootWindowHostX11
: public DesktopRootWindowHost,
public aura::RootWindowHost,
+ public ui::DesktopSelectionProviderAuraX11,
public MessageLoop::Dispatcher {
public:
DesktopRootWindowHostX11(
@@ -171,6 +174,10 @@ class VIEWS_EXPORT DesktopRootWindowHostX11
virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
virtual void PrepareForShutdown() OVERRIDE;
+ // Overridden from DesktopSelectionProviderAuraX11:
+ virtual void SetDropHandler(
+ ui::OSExchangeDataProviderAuraX11* handler) OVERRIDE;
+
// Overridden from Dispatcher:
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
@@ -208,6 +215,7 @@ class VIEWS_EXPORT DesktopRootWindowHostX11
scoped_ptr<views::corewm::CursorManager> cursor_client_;
scoped_ptr<DesktopDispatcherClient> dispatcher_client_;
scoped_ptr<aura::client::ScreenPositionClient> position_client_;
+ scoped_ptr<DesktopDragDropClientAuraX11> drag_drop_client_;
// Current Aura cursor.
gfx::NativeCursor current_cursor_;
@@ -224,6 +232,9 @@ class VIEWS_EXPORT DesktopRootWindowHostX11
aura::RootWindowHostDelegate* root_window_host_delegate_;
aura::Window* content_window_;
+ // We forward drop related messages to this object.
+ ui::OSExchangeDataProviderAuraX11* drop_handler_;
+
// The current root window host that has capture. While X11 has something
// like Windows SetCapture()/ReleaseCapture(), it is entirely implicit and
// there are no notifications when this changes. We need to track this so we

Powered by Google App Engine
This is Rietveld 408576698