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

Side by Side Diff: ui/aura/root_window_host_linux.h

Issue 10825050: Introduce RootWindowHostDelegate. The RootWindowHost performs most of its communication with RootWi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window_host_delegate.h ('k') | ui/aura/root_window_host_linux.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_AURA_ROOT_WINDOW_HOST_LINUX_H_ 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_LINUX_H_
6 #define UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ 6 #define UI_AURA_ROOT_WINDOW_HOST_LINUX_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.
11 #undef RootWindow 11 #undef RootWindow
12 12
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "ui/aura/root_window_host.h" 15 #include "ui/aura/root_window_host.h"
16 #include "ui/aura/x11_atom_cache.h" 16 #include "ui/aura/x11_atom_cache.h"
17 #include "ui/gfx/rect.h" 17 #include "ui/gfx/rect.h"
18 18
19 namespace ui { 19 namespace ui {
20 class ViewProp; 20 class ViewProp;
21 } 21 }
22 22
23 namespace aura { 23 namespace aura {
24 24
25 class RootWindowHostLinux : public RootWindowHost, 25 class RootWindowHostLinux : public RootWindowHost,
26 public MessageLoop::Dispatcher { 26 public MessageLoop::Dispatcher {
27 public: 27 public:
28 explicit RootWindowHostLinux(const gfx::Rect& bounds); 28 RootWindowHostLinux(RootWindowHostDelegate* delegate,
29 const gfx::Rect& bounds);
29 virtual ~RootWindowHostLinux(); 30 virtual ~RootWindowHostLinux();
30 31
31 // Overridden from Dispatcher overrides: 32 // Overridden from Dispatcher overrides:
32 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; 33 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
33 34
34 private: 35 private:
35 // RootWindowHost Overrides. 36 // RootWindowHost Overrides.
36 virtual void SetRootWindow(RootWindow* root_window) OVERRIDE;
37 virtual RootWindow* GetRootWindow() OVERRIDE; 37 virtual RootWindow* GetRootWindow() OVERRIDE;
38 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 38 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
39 virtual void Show() OVERRIDE; 39 virtual void Show() OVERRIDE;
40 virtual void ToggleFullScreen() OVERRIDE; 40 virtual void ToggleFullScreen() OVERRIDE;
41 virtual gfx::Rect GetBounds() const OVERRIDE; 41 virtual gfx::Rect GetBounds() const OVERRIDE;
42 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 42 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
43 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; 43 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
44 virtual void SetCapture() OVERRIDE; 44 virtual void SetCapture() OVERRIDE;
45 virtual void ReleaseCapture() OVERRIDE; 45 virtual void ReleaseCapture() OVERRIDE;
46 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE; 46 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE;
(...skipping 11 matching lines...) Expand all
58 58
59 // Returns true if there's an X window manager present... in most cases. Some 59 // Returns true if there's an X window manager present... in most cases. Some
60 // window managers (notably, ion3) don't implement enough of ICCCM for us to 60 // window managers (notably, ion3) don't implement enough of ICCCM for us to
61 // detect that they're there. 61 // detect that they're there.
62 bool IsWindowManagerPresent(); 62 bool IsWindowManagerPresent();
63 63
64 // Sets the cursor on |xwindow_| to |cursor|. Does not check or update 64 // Sets the cursor on |xwindow_| to |cursor|. Does not check or update
65 // |current_cursor_|. 65 // |current_cursor_|.
66 void SetCursorInternal(gfx::NativeCursor cursor); 66 void SetCursorInternal(gfx::NativeCursor cursor);
67 67
68 RootWindow* root_window_; 68 RootWindowHostDelegate* delegate_;
69 69
70 // The display and the native X window hosting the root window. 70 // The display and the native X window hosting the root window.
71 Display* xdisplay_; 71 Display* xdisplay_;
72 ::Window xwindow_; 72 ::Window xwindow_;
73 73
74 // The native root window. 74 // The native root window.
75 ::Window x_root_window_; 75 ::Window x_root_window_;
76 76
77 // Current Aura cursor. 77 // Current Aura cursor.
78 gfx::NativeCursor current_cursor_; 78 gfx::NativeCursor current_cursor_;
(...skipping 18 matching lines...) Expand all
97 scoped_ptr<ImageCursors> image_cursors_; 97 scoped_ptr<ImageCursors> image_cursors_;
98 98
99 X11AtomCache atom_cache_; 99 X11AtomCache atom_cache_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux); 101 DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux);
102 }; 102 };
103 103
104 } // namespace aura 104 } // namespace aura
105 105
106 #endif // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ 106 #endif // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_delegate.h ('k') | ui/aura/root_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698