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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 809903005: ui/views: Cleanup usage of scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no need of Pass() Created 5 years, 11 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698