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

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

Issue 12342028: make menus, bubbles, etc. top level windows on aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes Created 7 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
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_LINUX_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_LINUX_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_LINUX_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_LINUX_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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void OnCaptureReleased(); 85 void OnCaptureReleased();
86 86
87 // Dispatches a mouse event, taking mouse capture into account. If a 87 // Dispatches a mouse event, taking mouse capture into account. If a
88 // different host has capture, we translate the event to its coordinate space 88 // different host has capture, we translate the event to its coordinate space
89 // and dispatch it to that host instead. 89 // and dispatch it to that host instead.
90 void DispatchMouseEvent(ui::MouseEvent* event); 90 void DispatchMouseEvent(ui::MouseEvent* event);
91 91
92 // Overridden from DesktopRootWindowHost: 92 // Overridden from DesktopRootWindowHost:
93 virtual aura::RootWindow* Init(aura::Window* content_window, 93 virtual aura::RootWindow* Init(aura::Window* content_window,
94 const Widget::InitParams& params) OVERRIDE; 94 const Widget::InitParams& params) OVERRIDE;
95 virtual void InitFocus(aura::Window* window) OVERRIDE;
95 virtual void Close() OVERRIDE; 96 virtual void Close() OVERRIDE;
96 virtual void CloseNow() OVERRIDE; 97 virtual void CloseNow() OVERRIDE;
97 virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE; 98 virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE;
98 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE; 99 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE;
99 virtual void ShowMaximizedWithBounds( 100 virtual void ShowMaximizedWithBounds(
100 const gfx::Rect& restored_bounds) OVERRIDE; 101 const gfx::Rect& restored_bounds) OVERRIDE;
101 virtual bool IsVisible() const OVERRIDE; 102 virtual bool IsVisible() const OVERRIDE;
102 virtual void SetSize(const gfx::Size& size) OVERRIDE; 103 virtual void SetSize(const gfx::Size& size) OVERRIDE;
103 virtual void CenterWindow(const gfx::Size& size) OVERRIDE; 104 virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
104 virtual void GetWindowPlacement( 105 virtual void GetWindowPlacement(
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE; 163 virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE;
163 virtual bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds, 164 virtual bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds,
164 const gfx::Point& dest_offset, 165 const gfx::Point& dest_offset,
165 SkCanvas* canvas) OVERRIDE; 166 SkCanvas* canvas) OVERRIDE;
166 virtual bool GrabSnapshot( 167 virtual bool GrabSnapshot(
167 const gfx::Rect& snapshot_bounds, 168 const gfx::Rect& snapshot_bounds,
168 std::vector<unsigned char>* png_representation) OVERRIDE; 169 std::vector<unsigned char>* png_representation) OVERRIDE;
169 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; 170 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE;
170 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; 171 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
171 virtual void PrepareForShutdown() OVERRIDE; 172 virtual void PrepareForShutdown() OVERRIDE;
173 virtual void SetHostWindowExpansion(const gfx::Rect& extra) OVERRIDE;
172 174
173 // Overridden from Dispatcher: 175 // Overridden from Dispatcher:
174 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; 176 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
175 177
176 base::WeakPtrFactory<DesktopRootWindowHostLinux> close_widget_factory_; 178 base::WeakPtrFactory<DesktopRootWindowHostLinux> close_widget_factory_;
177 179
178 // X11 things 180 // X11 things
179 // The display and the native X window hosting the root window. 181 // The display and the native X window hosting the root window.
180 Display* xdisplay_; 182 Display* xdisplay_;
181 ::Window xwindow_; 183 ::Window xwindow_;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // can notify widgets when they have lost capture, which controls a bunch of 231 // can notify widgets when they have lost capture, which controls a bunch of
230 // things in views like hiding menus. 232 // things in views like hiding menus.
231 static DesktopRootWindowHostLinux* g_current_capture; 233 static DesktopRootWindowHostLinux* g_current_capture;
232 234
233 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostLinux); 235 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostLinux);
234 }; 236 };
235 237
236 } // namespace views 238 } // namespace views
237 239
238 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_LINUX_H_ 240 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698