OLD | NEW |
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_ROOT_WINDOW_HOST_X11_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_X11_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_X11_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_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 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE; | 109 virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE; |
110 virtual bool IsAlwaysOnTop() const OVERRIDE; | 110 virtual bool IsAlwaysOnTop() const OVERRIDE; |
111 virtual bool SetWindowTitle(const base::string16& title) OVERRIDE; | 111 virtual bool SetWindowTitle(const base::string16& title) OVERRIDE; |
112 virtual void ClearNativeFocus() OVERRIDE; | 112 virtual void ClearNativeFocus() OVERRIDE; |
113 virtual Widget::MoveLoopResult RunMoveLoop( | 113 virtual Widget::MoveLoopResult RunMoveLoop( |
114 const gfx::Vector2d& drag_offset, | 114 const gfx::Vector2d& drag_offset, |
115 Widget::MoveLoopSource source, | 115 Widget::MoveLoopSource source, |
116 Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE; | 116 Widget::MoveLoopEscapeBehavior escape_behavior) OVERRIDE; |
117 virtual void EndMoveLoop() OVERRIDE; | 117 virtual void EndMoveLoop() OVERRIDE; |
118 virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE; | 118 virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE; |
119 virtual bool ShouldUseNativeFrame() OVERRIDE; | 119 virtual bool ShouldUseNativeFrame() const OVERRIDE; |
| 120 virtual bool ShouldWindowContentsBeTransparent() const OVERRIDE; |
120 virtual void FrameTypeChanged() OVERRIDE; | 121 virtual void FrameTypeChanged() OVERRIDE; |
121 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; | 122 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; |
122 virtual void SetFullscreen(bool fullscreen) OVERRIDE; | 123 virtual void SetFullscreen(bool fullscreen) OVERRIDE; |
123 virtual bool IsFullscreen() const OVERRIDE; | 124 virtual bool IsFullscreen() const OVERRIDE; |
124 virtual void SetOpacity(unsigned char opacity) OVERRIDE; | 125 virtual void SetOpacity(unsigned char opacity) OVERRIDE; |
125 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, | 126 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, |
126 const gfx::ImageSkia& app_icon) OVERRIDE; | 127 const gfx::ImageSkia& app_icon) OVERRIDE; |
127 virtual void InitModalType(ui::ModalType modal_type) OVERRIDE; | 128 virtual void InitModalType(ui::ModalType modal_type) OVERRIDE; |
128 virtual void FlashFrame(bool flash_frame) OVERRIDE; | 129 virtual void FlashFrame(bool flash_frame) OVERRIDE; |
129 virtual void OnRootViewLayout() const OVERRIDE; | 130 virtual void OnRootViewLayout() const OVERRIDE; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // detect that they're there. | 172 // detect that they're there. |
172 bool IsWindowManagerPresent(); | 173 bool IsWindowManagerPresent(); |
173 | 174 |
174 // Sends a message to the x11 window manager, enabling or disabling the | 175 // Sends a message to the x11 window manager, enabling or disabling the |
175 // states |state1| and |state2|. | 176 // states |state1| and |state2|. |
176 void SetWMSpecState(bool enabled, ::Atom state1, ::Atom state2); | 177 void SetWMSpecState(bool enabled, ::Atom state1, ::Atom state2); |
177 | 178 |
178 // Checks if the window manager has set a specific state. | 179 // Checks if the window manager has set a specific state. |
179 bool HasWMSpecProperty(const char* property) const; | 180 bool HasWMSpecProperty(const char* property) const; |
180 | 181 |
| 182 // Sets whether the window's borders are provided by the window manager. |
| 183 void SetUseNativeFrame(bool use_native_frame); |
| 184 |
181 // Called when another DRWHL takes capture, or when capture is released | 185 // Called when another DRWHL takes capture, or when capture is released |
182 // entirely. | 186 // entirely. |
183 void OnCaptureReleased(); | 187 void OnCaptureReleased(); |
184 | 188 |
185 // Dispatches a mouse event, taking mouse capture into account. If a | 189 // Dispatches a mouse event, taking mouse capture into account. If a |
186 // different host has capture, we translate the event to its coordinate space | 190 // different host has capture, we translate the event to its coordinate space |
187 // and dispatch it to that host instead. | 191 // and dispatch it to that host instead. |
188 void DispatchMouseEvent(ui::MouseEvent* event); | 192 void DispatchMouseEvent(ui::MouseEvent* event); |
189 | 193 |
190 // Dispatches a touch event, taking capture into account. If a different host | 194 // Dispatches a touch event, taking capture into account. If a different host |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 // The window manager state bits. | 244 // The window manager state bits. |
241 std::set< ::Atom> window_properties_; | 245 std::set< ::Atom> window_properties_; |
242 | 246 |
243 // Local flag for fullscreen state to avoid a state mismatch between | 247 // Local flag for fullscreen state to avoid a state mismatch between |
244 // server and local window_properties_ during app-initiated fullscreen. | 248 // server and local window_properties_ during app-initiated fullscreen. |
245 bool is_fullscreen_; | 249 bool is_fullscreen_; |
246 | 250 |
247 // True if the window should stay on top of most other windows. | 251 // True if the window should stay on top of most other windows. |
248 bool is_always_on_top_; | 252 bool is_always_on_top_; |
249 | 253 |
| 254 // True if the window has title-bar / borders provided by the window manager. |
| 255 bool use_native_frame_; |
| 256 |
250 // We are owned by the RootWindow, but we have to have a back pointer to it. | 257 // We are owned by the RootWindow, but we have to have a back pointer to it. |
251 aura::RootWindow* root_window_; | 258 aura::RootWindow* root_window_; |
252 | 259 |
253 scoped_ptr<DesktopDispatcherClient> dispatcher_client_; | 260 scoped_ptr<DesktopDispatcherClient> dispatcher_client_; |
254 | 261 |
255 DesktopDragDropClientAuraX11* drag_drop_client_; | 262 DesktopDragDropClientAuraX11* drag_drop_client_; |
256 | 263 |
257 // Current Aura cursor. | 264 // Current Aura cursor. |
258 gfx::NativeCursor current_cursor_; | 265 gfx::NativeCursor current_cursor_; |
259 | 266 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 scoped_ptr<X11ScopedCapture> x11_capture_; | 299 scoped_ptr<X11ScopedCapture> x11_capture_; |
293 | 300 |
294 base::string16 window_title_; | 301 base::string16 window_title_; |
295 | 302 |
296 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); | 303 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); |
297 }; | 304 }; |
298 | 305 |
299 } // namespace views | 306 } // namespace views |
300 | 307 |
301 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_X11_H_ | 308 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_X11_H_ |
OLD | NEW |