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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.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
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_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
6 6
7 #include "base/win/metro.h" 7 #include "base/win/metro.h"
8 #include "third_party/skia/include/core/SkPath.h" 8 #include "third_party/skia/include/core/SkPath.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 content_window_->type() != ui::wm::WINDOW_TYPE_NORMAL && 165 content_window_->type() != ui::wm::WINDOW_TYPE_NORMAL &&
166 !wm::WindowAnimationsDisabled(content_window_); 166 !wm::WindowAnimationsDisabled(content_window_);
167 167
168 // TODO this is not invoked *after* Init(), but should be ok. 168 // TODO this is not invoked *after* Init(), but should be ok.
169 SetWindowTransparency(); 169 SetWindowTransparency();
170 } 170 }
171 171
172 scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostWin::CreateTooltip() { 172 scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostWin::CreateTooltip() {
173 DCHECK(!tooltip_); 173 DCHECK(!tooltip_);
174 tooltip_ = new corewm::TooltipWin(GetAcceleratedWidget()); 174 tooltip_ = new corewm::TooltipWin(GetAcceleratedWidget());
175 return scoped_ptr<corewm::Tooltip>(tooltip_); 175 return make_scoped_ptr(tooltip_);
176 } 176 }
177 177
178 scoped_ptr<aura::client::DragDropClient> 178 scoped_ptr<aura::client::DragDropClient>
179 DesktopWindowTreeHostWin::CreateDragDropClient( 179 DesktopWindowTreeHostWin::CreateDragDropClient(
180 DesktopNativeCursorManager* cursor_manager) { 180 DesktopNativeCursorManager* cursor_manager) {
181 drag_drop_client_ = new DesktopDragDropClientWin(window(), GetHWND()); 181 drag_drop_client_ = new DesktopDragDropClientWin(window(), GetHWND());
182 return scoped_ptr<aura::client::DragDropClient>(drag_drop_client_).Pass(); 182 return make_scoped_ptr(drag_drop_client_);
183 } 183 }
184 184
185 void DesktopWindowTreeHostWin::Close() { 185 void DesktopWindowTreeHostWin::Close() {
186 // TODO(beng): Move this entire branch to DNWA so it can be shared with X11. 186 // TODO(beng): Move this entire branch to DNWA so it can be shared with X11.
187 if (should_animate_window_close_) { 187 if (should_animate_window_close_) {
188 pending_close_ = true; 188 pending_close_ = true;
189 const bool is_animating = 189 const bool is_animating =
190 content_window_->layer()->GetAnimator()->IsAnimatingProperty( 190 content_window_->layer()->GetAnimator()->IsAnimatingProperty(
191 ui::LayerAnimationElement::VISIBILITY); 191 ui::LayerAnimationElement::VISIBILITY);
192 // Animation may not start for a number of reasons. 192 // Animation may not start for a number of reasons.
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 997
998 // static 998 // static
999 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 999 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
1000 internal::NativeWidgetDelegate* native_widget_delegate, 1000 internal::NativeWidgetDelegate* native_widget_delegate,
1001 DesktopNativeWidgetAura* desktop_native_widget_aura) { 1001 DesktopNativeWidgetAura* desktop_native_widget_aura) {
1002 return new DesktopWindowTreeHostWin(native_widget_delegate, 1002 return new DesktopWindowTreeHostWin(native_widget_delegate,
1003 desktop_native_widget_aura); 1003 desktop_native_widget_aura);
1004 } 1004 }
1005 1005
1006 } // namespace views 1006 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698