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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_root_window_host_x11.h

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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
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_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/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.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, 120 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon,
121 const gfx::ImageSkia& app_icon) OVERRIDE; 121 const gfx::ImageSkia& app_icon) OVERRIDE;
122 virtual void InitModalType(ui::ModalType modal_type) OVERRIDE; 122 virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
123 virtual void FlashFrame(bool flash_frame) OVERRIDE; 123 virtual void FlashFrame(bool flash_frame) OVERRIDE;
124 virtual void OnRootViewLayout() const OVERRIDE; 124 virtual void OnRootViewLayout() const OVERRIDE;
125 virtual void OnNativeWidgetFocus() OVERRIDE; 125 virtual void OnNativeWidgetFocus() OVERRIDE;
126 virtual void OnNativeWidgetBlur() OVERRIDE; 126 virtual void OnNativeWidgetBlur() OVERRIDE;
127 virtual bool IsAnimatingClosed() const OVERRIDE; 127 virtual bool IsAnimatingClosed() const OVERRIDE;
128 128
129 // Overridden from aura::RootWindowHost: 129 // Overridden from aura::RootWindowHost:
130 virtual void SetDelegate(aura::RootWindowHostDelegate* delegate) OVERRIDE;
131 virtual aura::RootWindow* GetRootWindow() OVERRIDE; 130 virtual aura::RootWindow* GetRootWindow() OVERRIDE;
132 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 131 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
133 virtual void Show() OVERRIDE; 132 virtual void Show() OVERRIDE;
134 virtual void Hide() OVERRIDE; 133 virtual void Hide() OVERRIDE;
135 virtual void ToggleFullScreen() OVERRIDE; 134 virtual void ToggleFullScreen() OVERRIDE;
136 virtual gfx::Rect GetBounds() const OVERRIDE; 135 virtual gfx::Rect GetBounds() const OVERRIDE;
137 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 136 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
138 virtual gfx::Insets GetInsets() const OVERRIDE; 137 virtual gfx::Insets GetInsets() const OVERRIDE;
139 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; 138 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE;
140 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; 139 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
141 virtual void SetCapture() OVERRIDE; 140 virtual void SetCapture() OVERRIDE;
142 virtual void ReleaseCapture() OVERRIDE; 141 virtual void ReleaseCapture() OVERRIDE;
143 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; 142 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
144 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; 143 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE;
145 virtual bool ConfineCursorToRootWindow() OVERRIDE; 144 virtual bool ConfineCursorToRootWindow() OVERRIDE;
146 virtual void UnConfineCursor() OVERRIDE; 145 virtual void UnConfineCursor() OVERRIDE;
147 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE; 146 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE;
148 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; 147 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
149 virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE;
150 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; 148 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE;
151 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; 149 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
152 virtual void PrepareForShutdown() OVERRIDE; 150 virtual void PrepareForShutdown() OVERRIDE;
153 151
154 private: 152 private:
155 // Initializes our X11 surface to draw on. This method performs all 153 // Initializes our X11 surface to draw on. This method performs all
156 // initialization related to talking to the X11 server. 154 // initialization related to talking to the X11 server.
157 void InitX11Window(const Widget::InitParams& params); 155 void InitX11Window(const Widget::InitParams& params);
158 156
159 // Creates an aura::RootWindow to contain the |content_window|, along with 157 // Creates an aura::RootWindow to contain the |content_window|, along with
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 246
249 scoped_ptr<X11WindowEventFilter> x11_window_event_filter_; 247 scoped_ptr<X11WindowEventFilter> x11_window_event_filter_;
250 scoped_ptr<X11DesktopWindowMoveClient> x11_window_move_client_; 248 scoped_ptr<X11DesktopWindowMoveClient> x11_window_move_client_;
251 249
252 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura 250 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura
253 // instead of providing this route back to Widget. 251 // instead of providing this route back to Widget.
254 internal::NativeWidgetDelegate* native_widget_delegate_; 252 internal::NativeWidgetDelegate* native_widget_delegate_;
255 253
256 DesktopNativeWidgetAura* desktop_native_widget_aura_; 254 DesktopNativeWidgetAura* desktop_native_widget_aura_;
257 255
258 aura::RootWindowHostDelegate* root_window_host_delegate_;
259 aura::Window* content_window_; 256 aura::Window* content_window_;
260 257
261 // We can optionally have a parent which can order us to close, or own 258 // We can optionally have a parent which can order us to close, or own
262 // children who we're responsible for closing when we CloseNow(). 259 // children who we're responsible for closing when we CloseNow().
263 DesktopRootWindowHostX11* window_parent_; 260 DesktopRootWindowHostX11* window_parent_;
264 std::set<DesktopRootWindowHostX11*> window_children_; 261 std::set<DesktopRootWindowHostX11*> window_children_;
265 262
266 ObserverList<DesktopRootWindowHostObserverX11> observer_list_; 263 ObserverList<DesktopRootWindowHostObserverX11> observer_list_;
267 264
268 // The current root window host that has capture. While X11 has something 265 // The current root window host that has capture. While X11 has something
269 // like Windows SetCapture()/ReleaseCapture(), it is entirely implicit and 266 // like Windows SetCapture()/ReleaseCapture(), it is entirely implicit and
270 // there are no notifications when this changes. We need to track this so we 267 // there are no notifications when this changes. We need to track this so we
271 // can notify widgets when they have lost capture, which controls a bunch of 268 // can notify widgets when they have lost capture, which controls a bunch of
272 // things in views like hiding menus. 269 // things in views like hiding menus.
273 static DesktopRootWindowHostX11* g_current_capture; 270 static DesktopRootWindowHostX11* g_current_capture;
274 271
275 // A list of all (top-level) windows that have been created but not yet 272 // A list of all (top-level) windows that have been created but not yet
276 // destroyed. 273 // destroyed.
277 static std::list<XID>* open_windows_; 274 static std::list<XID>* open_windows_;
278 275
279 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostX11); 276 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostX11);
280 }; 277 };
281 278
282 } // namespace views 279 } // namespace views
283 280
284 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_X11_H_ 281 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698