| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 x11_window_move_client_.reset(new X11DesktopWindowMoveClient); | 282 x11_window_move_client_.reset(new X11DesktopWindowMoveClient); |
| 283 aura::client::SetWindowMoveClient(window(), x11_window_move_client_.get()); | 283 aura::client::SetWindowMoveClient(window(), x11_window_move_client_.get()); |
| 284 | 284 |
| 285 SetWindowTransparency(); | 285 SetWindowTransparency(); |
| 286 | 286 |
| 287 native_widget_delegate_->OnNativeWidgetCreated(true); | 287 native_widget_delegate_->OnNativeWidgetCreated(true); |
| 288 } | 288 } |
| 289 | 289 |
| 290 scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostX11::CreateTooltip() { | 290 scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostX11::CreateTooltip() { |
| 291 return scoped_ptr<corewm::Tooltip>( | 291 return make_scoped_ptr(new corewm::TooltipAura(gfx::SCREEN_TYPE_NATIVE)); |
| 292 new corewm::TooltipAura(gfx::SCREEN_TYPE_NATIVE)); | |
| 293 } | 292 } |
| 294 | 293 |
| 295 scoped_ptr<aura::client::DragDropClient> | 294 scoped_ptr<aura::client::DragDropClient> |
| 296 DesktopWindowTreeHostX11::CreateDragDropClient( | 295 DesktopWindowTreeHostX11::CreateDragDropClient( |
| 297 DesktopNativeCursorManager* cursor_manager) { | 296 DesktopNativeCursorManager* cursor_manager) { |
| 298 drag_drop_client_ = new DesktopDragDropClientAuraX11( | 297 drag_drop_client_ = new DesktopDragDropClientAuraX11( |
| 299 window(), cursor_manager, xdisplay_, xwindow_); | 298 window(), cursor_manager, xdisplay_, xwindow_); |
| 300 drag_drop_client_->Init(); | 299 drag_drop_client_->Init(); |
| 301 return scoped_ptr<aura::client::DragDropClient>(drag_drop_client_).Pass(); | 300 return make_scoped_ptr(drag_drop_client_); |
| 302 } | 301 } |
| 303 | 302 |
| 304 void DesktopWindowTreeHostX11::Close() { | 303 void DesktopWindowTreeHostX11::Close() { |
| 305 // TODO(erg): Might need to do additional hiding tasks here. | 304 // TODO(erg): Might need to do additional hiding tasks here. |
| 306 delayed_resize_task_.Cancel(); | 305 delayed_resize_task_.Cancel(); |
| 307 | 306 |
| 308 if (!close_widget_factory_.HasWeakPtrs()) { | 307 if (!close_widget_factory_.HasWeakPtrs()) { |
| 309 // And we delay the close so that if we are called from an ATL callback, | 308 // And we delay the close so that if we are called from an ATL callback, |
| 310 // we don't destroy the window before the callback returned (as the caller | 309 // we don't destroy the window before the callback returned (as the caller |
| 311 // may delete ourselves on destroy and the ATL callback would still | 310 // may delete ourselves on destroy and the ATL callback would still |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 if (linux_ui) { | 1929 if (linux_ui) { |
| 1931 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 1930 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 1932 if (native_theme) | 1931 if (native_theme) |
| 1933 return native_theme; | 1932 return native_theme; |
| 1934 } | 1933 } |
| 1935 | 1934 |
| 1936 return ui::NativeTheme::instance(); | 1935 return ui::NativeTheme::instance(); |
| 1937 } | 1936 } |
| 1938 | 1937 |
| 1939 } // namespace views | 1938 } // namespace views |
| OLD | NEW |