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

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

Powered by Google App Engine
This is Rietveld 408576698