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

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

Issue 1155013005: Refactoring the ownership of ui::InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed bot failure: cast_shell_linux Created 5 years, 6 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
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_WINDOW_TREE_HOST_X11_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
7 7
8 #include <X11/extensions/shape.h> 8 #include <X11/extensions/shape.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 #include <X11/Xutil.h> 10 #include <X11/Xutil.h>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/cancelable_callback.h" 13 #include "base/cancelable_callback.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "ui/aura/window_tree_host.h" 16 #include "ui/aura/window_tree_host.h"
17 #include "ui/base/cursor/cursor_loader_x11.h" 17 #include "ui/base/cursor/cursor_loader_x11.h"
18 #include "ui/events/event_source.h"
19 #include "ui/events/platform/platform_event_dispatcher.h" 18 #include "ui/events/platform/platform_event_dispatcher.h"
20 #include "ui/gfx/geometry/insets.h" 19 #include "ui/gfx/geometry/insets.h"
21 #include "ui/gfx/geometry/rect.h" 20 #include "ui/gfx/geometry/rect.h"
22 #include "ui/gfx/geometry/size.h" 21 #include "ui/gfx/geometry/size.h"
23 #include "ui/gfx/x/x11_atom_cache.h" 22 #include "ui/gfx/x/x11_atom_cache.h"
24 #include "ui/views/views_export.h" 23 #include "ui/views/views_export.h"
25 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" 24 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h"
26 25
27 namespace gfx { 26 namespace gfx {
28 class ImageSkia; 27 class ImageSkia;
29 class ImageSkiaRep; 28 class ImageSkiaRep;
30 } 29 }
31 30
32 namespace ui { 31 namespace ui {
33 class EventHandler; 32 class EventHandler;
34 } 33 }
35 34
36 namespace views { 35 namespace views {
37 class DesktopDragDropClientAuraX11; 36 class DesktopDragDropClientAuraX11;
38 class DesktopDispatcherClient; 37 class DesktopDispatcherClient;
39 class DesktopWindowTreeHostObserverX11; 38 class DesktopWindowTreeHostObserverX11;
40 class X11DesktopWindowMoveClient; 39 class X11DesktopWindowMoveClient;
41 class X11WindowEventFilter; 40 class X11WindowEventFilter;
42 41
43 class VIEWS_EXPORT DesktopWindowTreeHostX11 42 class VIEWS_EXPORT DesktopWindowTreeHostX11
44 : public DesktopWindowTreeHost, 43 : public DesktopWindowTreeHost,
45 public aura::WindowTreeHost, 44 public aura::WindowTreeHost,
46 public ui::EventSource,
47 public ui::PlatformEventDispatcher { 45 public ui::PlatformEventDispatcher {
48 public: 46 public:
49 DesktopWindowTreeHostX11( 47 DesktopWindowTreeHostX11(
50 internal::NativeWidgetDelegate* native_widget_delegate, 48 internal::NativeWidgetDelegate* native_widget_delegate,
51 DesktopNativeWidgetAura* desktop_native_widget_aura); 49 DesktopNativeWidgetAura* desktop_native_widget_aura);
52 ~DesktopWindowTreeHostX11() override; 50 ~DesktopWindowTreeHostX11() override;
53 51
54 // A way of converting an X11 |xid| host window into a |content_window_|. 52 // A way of converting an X11 |xid| host window into a |content_window_|.
55 static aura::Window* GetContentWindowForXID(XID xid); 53 static aura::Window* GetContentWindowForXID(XID xid);
56 54
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void HideImpl() override; 154 void HideImpl() override;
157 gfx::Rect GetBounds() const override; 155 gfx::Rect GetBounds() const override;
158 void SetBounds(const gfx::Rect& requested_bounds_in_pixels) override; 156 void SetBounds(const gfx::Rect& requested_bounds_in_pixels) override;
159 gfx::Point GetLocationOnNativeScreen() const override; 157 gfx::Point GetLocationOnNativeScreen() const override;
160 void SetCapture() override; 158 void SetCapture() override;
161 void ReleaseCapture() override; 159 void ReleaseCapture() override;
162 void SetCursorNative(gfx::NativeCursor cursor) override; 160 void SetCursorNative(gfx::NativeCursor cursor) override;
163 void MoveCursorToNative(const gfx::Point& location) override; 161 void MoveCursorToNative(const gfx::Point& location) override;
164 void OnCursorVisibilityChangedNative(bool show) override; 162 void OnCursorVisibilityChangedNative(bool show) override;
165 163
166 // Overridden frm ui::EventSource
167 ui::EventProcessor* GetEventProcessor() override;
168
169 private: 164 private:
170 friend class DesktopWindowTreeHostX11HighDPITest; 165 friend class DesktopWindowTreeHostX11HighDPITest;
171 // Initializes our X11 surface to draw on. This method performs all 166 // Initializes our X11 surface to draw on. This method performs all
172 // initialization related to talking to the X11 server. 167 // initialization related to talking to the X11 server.
173 void InitX11Window(const Widget::InitParams& params); 168 void InitX11Window(const Widget::InitParams& params);
174 169
175 // Creates an aura::WindowEventDispatcher to contain the |content_window|, 170 // Creates an aura::WindowEventDispatcher to contain the |content_window|,
176 // along with all aura client objects that direct behavior. 171 // along with all aura client objects that direct behavior.
177 aura::WindowEventDispatcher* InitDispatcher(const Widget::InitParams& params); 172 aura::WindowEventDispatcher* InitDispatcher(const Widget::InitParams& params);
178 173
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 base::CancelableCallback<void()> delayed_resize_task_; 346 base::CancelableCallback<void()> delayed_resize_task_;
352 347
353 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; 348 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
354 349
355 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); 350 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
356 }; 351 };
357 352
358 } // namespace views 353 } // namespace views
359 354
360 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ 355 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698