OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "ui/aura/desktop_host.h" | 5 #include "ui/aura/desktop_host.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/message_pump_x.h" | 8 #include "base/message_pump_x.h" |
9 #include "ui/aura/desktop.h" | 9 #include "ui/aura/desktop.h" |
10 #include "ui/aura/event.h" | 10 #include "ui/aura/event.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 private: | 23 private: |
24 // base::MessageLoop::Dispatcher Override. | 24 // base::MessageLoop::Dispatcher Override. |
25 virtual DispatchStatus Dispatch(XEvent* xev) OVERRIDE; | 25 virtual DispatchStatus Dispatch(XEvent* xev) OVERRIDE; |
26 | 26 |
27 // DesktopHost Overrides. | 27 // DesktopHost Overrides. |
28 virtual void SetDesktop(Desktop* desktop) OVERRIDE; | 28 virtual void SetDesktop(Desktop* desktop) OVERRIDE; |
29 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 29 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
30 virtual void Show() OVERRIDE; | 30 virtual void Show() OVERRIDE; |
31 virtual gfx::Size GetSize() OVERRIDE; | 31 virtual gfx::Size GetSize() OVERRIDE; |
32 virtual void SetSize(const gfx::Size& size) OVERRIDE; | 32 virtual void SetSize(const gfx::Size& size) OVERRIDE; |
| 33 virtual void SetCursor(CursorType cursor_type) OVERRIDE; |
33 | 34 |
34 Desktop* desktop_; | 35 Desktop* desktop_; |
35 | 36 |
36 // The display and the native X window hosting the desktop. | 37 // The display and the native X window hosting the desktop. |
37 Display* xdisplay_; | 38 Display* xdisplay_; |
38 ::Window xwindow_; | 39 ::Window xwindow_; |
39 | 40 |
40 // The size of |xwindow_|. | 41 // The size of |xwindow_|. |
41 gfx::Rect bounds_; | 42 gfx::Rect bounds_; |
42 | 43 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } | 107 } |
107 | 108 |
108 gfx::Size DesktopHostLinux::GetSize() { | 109 gfx::Size DesktopHostLinux::GetSize() { |
109 return bounds_.size(); | 110 return bounds_.size(); |
110 } | 111 } |
111 | 112 |
112 void DesktopHostLinux::SetSize(const gfx::Size& size) { | 113 void DesktopHostLinux::SetSize(const gfx::Size& size) { |
113 XResizeWindow(xdisplay_, xwindow_, size.width(), size.height()); | 114 XResizeWindow(xdisplay_, xwindow_, size.width(), size.height()); |
114 } | 115 } |
115 | 116 |
| 117 void DesktopHostLinux::SetCursor(CursorType cursor_type) { |
| 118 NOTIMPLEMENTED(); |
| 119 } |
| 120 |
116 } // namespace | 121 } // namespace |
117 | 122 |
118 // static | 123 // static |
119 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) { | 124 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) { |
120 return new DesktopHostLinux(bounds); | 125 return new DesktopHostLinux(bounds); |
121 } | 126 } |
122 | 127 |
123 } // namespace aura | 128 } // namespace aura |
OLD | NEW |