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 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" |
6 | 6 |
7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
9 #include <X11/Xutil.h> | 9 #include <X11/Xutil.h> |
10 | 10 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 if (sanitized_params.bounds.height() == 0) | 329 if (sanitized_params.bounds.height() == 0) |
330 sanitized_params.bounds.set_height(100); | 330 sanitized_params.bounds.set_height(100); |
331 | 331 |
332 InitX11Window(sanitized_params); | 332 InitX11Window(sanitized_params); |
333 return InitRootWindow(sanitized_params); | 333 return InitRootWindow(sanitized_params); |
334 } | 334 } |
335 | 335 |
336 void DesktopRootWindowHostX11::InitFocus(aura::Window* window) { | 336 void DesktopRootWindowHostX11::InitFocus(aura::Window* window) { |
337 } | 337 } |
338 | 338 |
| 339 bool DesktopRootWindowHostX11::SetCloseOnHideCompletion() { |
| 340 return false; |
| 341 } |
| 342 |
339 void DesktopRootWindowHostX11::Close() { | 343 void DesktopRootWindowHostX11::Close() { |
340 // TODO(erg): Might need to do additional hiding tasks here. | 344 // TODO(erg): Might need to do additional hiding tasks here. |
341 | 345 |
342 if (!close_widget_factory_.HasWeakPtrs()) { | 346 if (!close_widget_factory_.HasWeakPtrs()) { |
343 // And we delay the close so that if we are called from an ATL callback, | 347 // And we delay the close so that if we are called from an ATL callback, |
344 // we don't destroy the window before the callback returned (as the caller | 348 // we don't destroy the window before the callback returned (as the caller |
345 // may delete ourselves on destroy and the ATL callback would still | 349 // may delete ourselves on destroy and the ATL callback would still |
346 // dereference us when the callback returns). | 350 // dereference us when the callback returns). |
347 MessageLoop::current()->PostTask( | 351 MessageLoop::current()->PostTask( |
348 FROM_HERE, | 352 FROM_HERE, |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 1145 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
1142 internal::NativeWidgetDelegate* native_widget_delegate, | 1146 internal::NativeWidgetDelegate* native_widget_delegate, |
1143 DesktopNativeWidgetAura* desktop_native_widget_aura, | 1147 DesktopNativeWidgetAura* desktop_native_widget_aura, |
1144 const gfx::Rect& initial_bounds) { | 1148 const gfx::Rect& initial_bounds) { |
1145 return new DesktopRootWindowHostX11(native_widget_delegate, | 1149 return new DesktopRootWindowHostX11(native_widget_delegate, |
1146 desktop_native_widget_aura, | 1150 desktop_native_widget_aura, |
1147 initial_bounds); | 1151 initial_bounds); |
1148 } | 1152 } |
1149 | 1153 |
1150 } // namespace views | 1154 } // namespace views |
OLD | NEW |