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_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 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 void AddObserver(views::DesktopWindowTreeHostObserverX11* observer); | 74 void AddObserver(views::DesktopWindowTreeHostObserverX11* observer); |
75 void RemoveObserver(views::DesktopWindowTreeHostObserverX11* observer); | 75 void RemoveObserver(views::DesktopWindowTreeHostObserverX11* observer); |
76 | 76 |
77 // Deallocates the internal list of open windows. | 77 // Deallocates the internal list of open windows. |
78 static void CleanUpWindowList(); | 78 static void CleanUpWindowList(); |
79 | 79 |
80 protected: | 80 protected: |
81 // Overridden from DesktopWindowTreeHost: | 81 // Overridden from DesktopWindowTreeHost: |
82 virtual void Init(aura::Window* content_window, | 82 virtual void Init(aura::Window* content_window, |
83 const Widget::InitParams& params) OVERRIDE; | 83 const Widget::InitParams& params, |
| 84 ui::ContextFactory* context_factory) OVERRIDE; |
84 virtual void OnNativeWidgetCreated(const Widget::InitParams& params) OVERRIDE; | 85 virtual void OnNativeWidgetCreated(const Widget::InitParams& params) OVERRIDE; |
85 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() OVERRIDE; | 86 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() OVERRIDE; |
86 virtual scoped_ptr<aura::client::DragDropClient> | 87 virtual scoped_ptr<aura::client::DragDropClient> |
87 CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE; | 88 CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE; |
88 virtual void Close() OVERRIDE; | 89 virtual void Close() OVERRIDE; |
89 virtual void CloseNow() OVERRIDE; | 90 virtual void CloseNow() OVERRIDE; |
90 virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE; | 91 virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE; |
91 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE; | 92 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE; |
92 virtual void ShowMaximizedWithBounds( | 93 virtual void ShowMaximizedWithBounds( |
93 const gfx::Rect& restored_bounds) OVERRIDE; | 94 const gfx::Rect& restored_bounds) OVERRIDE; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE; | 154 virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE; |
154 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; | 155 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; |
155 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; | 156 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; |
156 | 157 |
157 // Overridden frm ui::EventSource | 158 // Overridden frm ui::EventSource |
158 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; | 159 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; |
159 | 160 |
160 private: | 161 private: |
161 // Initializes our X11 surface to draw on. This method performs all | 162 // Initializes our X11 surface to draw on. This method performs all |
162 // initialization related to talking to the X11 server. | 163 // initialization related to talking to the X11 server. |
163 void InitX11Window(const Widget::InitParams& params); | 164 void InitX11Window(const Widget::InitParams& params, |
| 165 ui::ContextFactory* context_factory); |
164 | 166 |
165 // Creates an aura::WindowEventDispatcher to contain the |content_window|, | 167 // Creates an aura::WindowEventDispatcher to contain the |content_window|, |
166 // along with all aura client objects that direct behavior. | 168 // along with all aura client objects that direct behavior. |
167 aura::WindowEventDispatcher* InitDispatcher(const Widget::InitParams& params); | 169 aura::WindowEventDispatcher* InitDispatcher(const Widget::InitParams& params); |
168 | 170 |
169 // Called when |xwindow_|'s _NET_WM_STATE property is updated. | 171 // Called when |xwindow_|'s _NET_WM_STATE property is updated. |
170 void OnWMStateUpdated(); | 172 void OnWMStateUpdated(); |
171 | 173 |
172 // Called when |xwindow_|'s _NET_FRAME_EXTENTS property is updated. | 174 // Called when |xwindow_|'s _NET_FRAME_EXTENTS property is updated. |
173 void OnFrameExtentsUpdated(); | 175 void OnFrameExtentsUpdated(); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // attention to the window or completely ignore the hint. We stop flashing | 320 // attention to the window or completely ignore the hint. We stop flashing |
319 // the frame when |xwindow_| gains focus or handles a mouse button event. | 321 // the frame when |xwindow_| gains focus or handles a mouse button event. |
320 bool urgency_hint_set_; | 322 bool urgency_hint_set_; |
321 | 323 |
322 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); | 324 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); |
323 }; | 325 }; |
324 | 326 |
325 } // namespace views | 327 } // namespace views |
326 | 328 |
327 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ | 329 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ |
OLD | NEW |