Chromium Code Reviews| 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_linux.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_linux.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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 322 Widget::InitParams sanitized_params = params; | 322 Widget::InitParams sanitized_params = params; |
| 323 if (sanitized_params.bounds.width() == 0) | 323 if (sanitized_params.bounds.width() == 0) |
| 324 sanitized_params.bounds.set_width(100); | 324 sanitized_params.bounds.set_width(100); |
| 325 if (sanitized_params.bounds.height() == 0) | 325 if (sanitized_params.bounds.height() == 0) |
| 326 sanitized_params.bounds.set_height(100); | 326 sanitized_params.bounds.set_height(100); |
| 327 | 327 |
| 328 InitX11Window(sanitized_params); | 328 InitX11Window(sanitized_params); |
| 329 return InitRootWindow(sanitized_params); | 329 return InitRootWindow(sanitized_params); |
| 330 } | 330 } |
| 331 | 331 |
| 332 void DesktopRootWindowHostLinux::InitFocus(aura::Window* window) { | |
| 333 NOTIMPLEMENTED(); | |
| 334 } | |
| 335 | |
| 332 void DesktopRootWindowHostLinux::Close() { | 336 void DesktopRootWindowHostLinux::Close() { |
| 333 // TODO(erg): Might need to do additional hiding tasks here. | 337 // TODO(erg): Might need to do additional hiding tasks here. |
| 334 | 338 |
| 335 if (!close_widget_factory_.HasWeakPtrs()) { | 339 if (!close_widget_factory_.HasWeakPtrs()) { |
| 336 // And we delay the close so that if we are called from an ATL callback, | 340 // And we delay the close so that if we are called from an ATL callback, |
| 337 // we don't destroy the window before the callback returned (as the caller | 341 // we don't destroy the window before the callback returned (as the caller |
| 338 // may delete ourselves on destroy and the ATL callback would still | 342 // may delete ourselves on destroy and the ATL callback would still |
| 339 // dereference us when the callback returns). | 343 // dereference us when the callback returns). |
| 340 MessageLoop::current()->PostTask( | 344 MessageLoop::current()->PostTask( |
| 341 FROM_HERE, | 345 FROM_HERE, |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 870 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); | 874 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); |
| 871 } | 875 } |
| 872 | 876 |
| 873 void DesktopRootWindowHostLinux::OnDeviceScaleFactorChanged( | 877 void DesktopRootWindowHostLinux::OnDeviceScaleFactorChanged( |
| 874 float device_scale_factor) { | 878 float device_scale_factor) { |
| 875 } | 879 } |
| 876 | 880 |
| 877 void DesktopRootWindowHostLinux::PrepareForShutdown() { | 881 void DesktopRootWindowHostLinux::PrepareForShutdown() { |
| 878 } | 882 } |
| 879 | 883 |
| 884 void DesktopRootWindowHostLinux::SetHostWindowExpansion( | |
| 885 const gfx::Rect& extra) { | |
| 886 } | |
|
sky
2013/03/14 20:06:37
NOTIMPLEMENTED?
scottmg
2013/03/14 22:51:53
Done.
| |
| 887 | |
| 880 //////////////////////////////////////////////////////////////////////////////// | 888 //////////////////////////////////////////////////////////////////////////////// |
| 881 // DesktopRootWindowHostLinux, MessageLoop::Dispatcher implementation: | 889 // DesktopRootWindowHostLinux, MessageLoop::Dispatcher implementation: |
| 882 | 890 |
| 883 bool DesktopRootWindowHostLinux::Dispatch(const base::NativeEvent& event) { | 891 bool DesktopRootWindowHostLinux::Dispatch(const base::NativeEvent& event) { |
| 884 XEvent* xev = event; | 892 XEvent* xev = event; |
| 885 | 893 |
| 886 // May want to factor CheckXEventForConsistency(xev); into a common location | 894 // May want to factor CheckXEventForConsistency(xev); into a common location |
| 887 // since it is called here. | 895 // since it is called here. |
| 888 switch (xev->type) { | 896 switch (xev->type) { |
| 889 case Expose: | 897 case Expose: |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1121 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 1129 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
| 1122 internal::NativeWidgetDelegate* native_widget_delegate, | 1130 internal::NativeWidgetDelegate* native_widget_delegate, |
| 1123 DesktopNativeWidgetAura* desktop_native_widget_aura, | 1131 DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 1124 const gfx::Rect& initial_bounds) { | 1132 const gfx::Rect& initial_bounds) { |
| 1125 return new DesktopRootWindowHostLinux(native_widget_delegate, | 1133 return new DesktopRootWindowHostLinux(native_widget_delegate, |
| 1126 desktop_native_widget_aura, | 1134 desktop_native_widget_aura, |
| 1127 initial_bounds); | 1135 initial_bounds); |
| 1128 } | 1136 } |
| 1129 | 1137 |
| 1130 } // namespace views | 1138 } // namespace views |
| OLD | NEW |