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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h

Issue 22404006: Make DesktopDragDropClientAuraX11 not depend on DesktopRootWindowHostX11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_
7 7
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
(...skipping 27 matching lines...) Expand all
38 class DragSource; 38 class DragSource;
39 class DropTargetEvent; 39 class DropTargetEvent;
40 class OSExchangeData; 40 class OSExchangeData;
41 class OSExchangeDataProviderAuraX11; 41 class OSExchangeDataProviderAuraX11;
42 class RootWindow; 42 class RootWindow;
43 class SelectionFormatMap; 43 class SelectionFormatMap;
44 } 44 }
45 45
46 namespace views { 46 namespace views {
47 class DesktopNativeCursorManager; 47 class DesktopNativeCursorManager;
48 class DesktopRootWindowHostX11;
49 48
50 // Implements drag and drop on X11 for aura. On one side, this class takes raw 49 // Implements drag and drop on X11 for aura. On one side, this class takes raw
51 // X11 events forwarded from DesktopRootWindowHostLinux, while on the other, it 50 // X11 events forwarded from DesktopRootWindowHostLinux, while on the other, it
52 // handles the views drag events. 51 // handles the views drag events.
53 class VIEWS_EXPORT DesktopDragDropClientAuraX11 52 class VIEWS_EXPORT DesktopDragDropClientAuraX11
54 : public aura::client::DragDropClient, 53 : public aura::client::DragDropClient,
55 public aura::WindowObserver, 54 public aura::WindowObserver,
56 public X11WholeScreenMoveLoopDelegate { 55 public X11WholeScreenMoveLoopDelegate {
57 public: 56 public:
58 DesktopDragDropClientAuraX11( 57 DesktopDragDropClientAuraX11(
59 views::DesktopRootWindowHostX11* root_window_host,
60 aura::RootWindow* root_window, 58 aura::RootWindow* root_window,
61 views::DesktopNativeCursorManager* cursor_manager, 59 views::DesktopNativeCursorManager* cursor_manager,
62 Display* xdisplay, 60 Display* xdisplay,
63 ::Window xwindow); 61 ::Window xwindow);
64 virtual ~DesktopDragDropClientAuraX11(); 62 virtual ~DesktopDragDropClientAuraX11();
65 63
66 // We maintain a mapping of live DesktopDragDropClientAuraX11 objects to 64 // We maintain a mapping of live DesktopDragDropClientAuraX11 objects to
67 // their ::Windows. We do this so that we're able to short circuit sending 65 // their ::Windows. We do this so that we're able to short circuit sending
68 // X11 messages to windows in our process. 66 // X11 messages to windows in our process.
69 static DesktopDragDropClientAuraX11* GetForWindow(::Window window); 67 static DesktopDragDropClientAuraX11* GetForWindow(::Window window);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 void SendXdndDrop(::Window dest_window); 147 void SendXdndDrop(::Window dest_window);
150 148
151 // Sends |xev| to |xid|, optionally short circuiting the round trip to the X 149 // Sends |xev| to |xid|, optionally short circuiting the round trip to the X
152 // server. 150 // server.
153 void SendXClientEvent(::Window xid, XEvent* xev); 151 void SendXClientEvent(::Window xid, XEvent* xev);
154 152
155 // A nested message loop that notifies this object of events through the 153 // A nested message loop that notifies this object of events through the
156 // X11WholeScreenMoveLoopDelegate interface. 154 // X11WholeScreenMoveLoopDelegate interface.
157 X11WholeScreenMoveLoop move_loop_; 155 X11WholeScreenMoveLoop move_loop_;
158 156
159 views::DesktopRootWindowHostX11* root_window_host_;
160 aura::RootWindow* root_window_; 157 aura::RootWindow* root_window_;
161 158
162 Display* xdisplay_; 159 Display* xdisplay_;
163 ::Window xwindow_; 160 ::Window xwindow_;
164 161
165 ui::X11AtomCache atom_cache_; 162 ui::X11AtomCache atom_cache_;
166 163
167 // Target side information. 164 // Target side information.
168 class X11DragContext; 165 class X11DragContext;
169 scoped_ptr<X11DragContext> target_current_context_; 166 scoped_ptr<X11DragContext> target_current_context_;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 gfx::NativeCursor move_grab_cursor_; 221 gfx::NativeCursor move_grab_cursor_;
225 222
226 static std::map< ::Window, DesktopDragDropClientAuraX11*> g_live_client_map; 223 static std::map< ::Window, DesktopDragDropClientAuraX11*> g_live_client_map;
227 224
228 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11); 225 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11);
229 }; 226 };
230 227
231 } // namespace views 228 } // namespace views
232 229
233 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ 230 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698