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_window_tree_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
6 | 6 |
7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
10 #include <X11/Xregion.h> | 10 #include <X11/Xregion.h> |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostX11::CreateTooltip() { | 284 scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostX11::CreateTooltip() { |
285 return scoped_ptr<corewm::Tooltip>( | 285 return scoped_ptr<corewm::Tooltip>( |
286 new corewm::TooltipAura(gfx::SCREEN_TYPE_NATIVE)); | 286 new corewm::TooltipAura(gfx::SCREEN_TYPE_NATIVE)); |
287 } | 287 } |
288 | 288 |
289 scoped_ptr<aura::client::DragDropClient> | 289 scoped_ptr<aura::client::DragDropClient> |
290 DesktopWindowTreeHostX11::CreateDragDropClient( | 290 DesktopWindowTreeHostX11::CreateDragDropClient( |
291 DesktopNativeCursorManager* cursor_manager) { | 291 DesktopNativeCursorManager* cursor_manager) { |
292 drag_drop_client_ = new DesktopDragDropClientAuraX11( | 292 drag_drop_client_ = new DesktopDragDropClientAuraX11( |
293 window(), cursor_manager, xdisplay_, xwindow_); | 293 window(), cursor_manager, xdisplay_, xwindow_); |
| 294 drag_drop_client_->Init(); |
294 return scoped_ptr<aura::client::DragDropClient>(drag_drop_client_).Pass(); | 295 return scoped_ptr<aura::client::DragDropClient>(drag_drop_client_).Pass(); |
295 } | 296 } |
296 | 297 |
297 void DesktopWindowTreeHostX11::Close() { | 298 void DesktopWindowTreeHostX11::Close() { |
298 // TODO(erg): Might need to do additional hiding tasks here. | 299 // TODO(erg): Might need to do additional hiding tasks here. |
299 delayed_resize_task_.Cancel(); | 300 delayed_resize_task_.Cancel(); |
300 | 301 |
301 if (!close_widget_factory_.HasWeakPtrs()) { | 302 if (!close_widget_factory_.HasWeakPtrs()) { |
302 // And we delay the close so that if we are called from an ATL callback, | 303 // And we delay the close so that if we are called from an ATL callback, |
303 // we don't destroy the window before the callback returned (as the caller | 304 // we don't destroy the window before the callback returned (as the caller |
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 if (linux_ui) { | 1897 if (linux_ui) { |
1897 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 1898 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
1898 if (native_theme) | 1899 if (native_theme) |
1899 return native_theme; | 1900 return native_theme; |
1900 } | 1901 } |
1901 | 1902 |
1902 return ui::NativeTheme::instance(); | 1903 return ui::NativeTheme::instance(); |
1903 } | 1904 } |
1904 | 1905 |
1905 } // namespace views | 1906 } // namespace views |
OLD | NEW |