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

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

Issue 9564023: Revert 124461 - Remove the singleton instance get/delete methods from RootWindow (yay) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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.cc ('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 #pragma once 7 #pragma once
8 8
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 10
11 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 11 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
12 #undef RootWindow 12 #undef RootWindow
13 13
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/gfx/rect.h" 16 #include "ui/gfx/rect.h"
17 17
18 namespace aura { 18 namespace aura {
19 19
20 class RootWindowHostLinux : public RootWindowHost { 20 class RootWindowHostLinux : public RootWindowHost,
21 public MessageLoop::DestructionObserver {
21 public: 22 public:
22 explicit RootWindowHostLinux(const gfx::Rect& bounds); 23 explicit RootWindowHostLinux(const gfx::Rect& bounds);
23 virtual ~RootWindowHostLinux(); 24 virtual ~RootWindowHostLinux();
24 25
25 // Handles an event targeted at this host's window. 26 // Handles an event targeted at this host's window.
26 base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xev); 27 base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xev);
27 28
28 private: 29 private:
29 // RootWindowHost Overrides. 30 // RootWindowHost Overrides.
30 virtual void SetRootWindow(RootWindow* root_window) OVERRIDE; 31 virtual void SetRootWindow(RootWindow* root_window) OVERRIDE;
31 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 32 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
32 virtual void Show() OVERRIDE; 33 virtual void Show() OVERRIDE;
33 virtual void ToggleFullScreen() OVERRIDE; 34 virtual void ToggleFullScreen() OVERRIDE;
34 virtual gfx::Size GetSize() const OVERRIDE; 35 virtual gfx::Size GetSize() const OVERRIDE;
35 virtual void SetSize(const gfx::Size& size) OVERRIDE; 36 virtual void SetSize(const gfx::Size& size) OVERRIDE;
36 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; 37 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
37 virtual void SetCapture() OVERRIDE; 38 virtual void SetCapture() OVERRIDE;
38 virtual void ReleaseCapture() OVERRIDE; 39 virtual void ReleaseCapture() OVERRIDE;
39 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE; 40 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE;
40 virtual void ShowCursor(bool show) OVERRIDE; 41 virtual void ShowCursor(bool show) OVERRIDE;
41 virtual gfx::Point QueryMouseLocation() OVERRIDE; 42 virtual gfx::Point QueryMouseLocation() OVERRIDE;
42 virtual bool ConfineCursorToRootWindow() OVERRIDE; 43 virtual bool ConfineCursorToRootWindow() OVERRIDE;
43 virtual void UnConfineCursor() OVERRIDE; 44 virtual void UnConfineCursor() OVERRIDE;
44 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; 45 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
45 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; 46 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
46 47
48 // MessageLoop::DestructionObserver Overrides.
49 virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
50
47 // Returns true if there's an X window manager present... in most cases. Some 51 // Returns true if there's an X window manager present... in most cases. Some
48 // window managers (notably, ion3) don't implement enough of ICCCM for us to 52 // window managers (notably, ion3) don't implement enough of ICCCM for us to
49 // detect that they're there. 53 // detect that they're there.
50 bool IsWindowManagerPresent(); 54 bool IsWindowManagerPresent();
51 55
52 // Sets the cursor on |xwindow_| to |cursor|. Does not check or update 56 // Sets the cursor on |xwindow_| to |cursor|. Does not check or update
53 // |current_cursor_|. 57 // |current_cursor_|.
54 void SetCursorInternal(gfx::NativeCursor cursor); 58 void SetCursorInternal(gfx::NativeCursor cursor);
55 59
56 RootWindow* root_window_; 60 RootWindow* root_window_;
(...skipping 16 matching lines...) Expand all
73 77
74 // The bounds of |xwindow_|. 78 // The bounds of |xwindow_|.
75 gfx::Rect bounds_; 79 gfx::Rect bounds_;
76 80
77 DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux); 81 DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux);
78 }; 82 };
79 83
80 } // namespace aura 84 } // namespace aura
81 85
82 #endif // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_ 86 #endif // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/root_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698