Chromium Code Reviews| 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_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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 content_window_->type() != ui::wm::WINDOW_TYPE_NORMAL && | 163 content_window_->type() != ui::wm::WINDOW_TYPE_NORMAL && |
| 164 !wm::WindowAnimationsDisabled(content_window_); | 164 !wm::WindowAnimationsDisabled(content_window_); |
| 165 | 165 |
| 166 // TODO this is not invoked *after* Init(), but should be ok. | 166 // TODO this is not invoked *after* Init(), but should be ok. |
| 167 SetWindowTransparency(); | 167 SetWindowTransparency(); |
| 168 } | 168 } |
| 169 | 169 |
| 170 scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostWin::CreateTooltip() { | 170 scoped_ptr<corewm::Tooltip> DesktopWindowTreeHostWin::CreateTooltip() { |
| 171 DCHECK(!tooltip_); | 171 DCHECK(!tooltip_); |
| 172 tooltip_ = new corewm::TooltipWin(GetAcceleratedWidget()); | 172 tooltip_ = new corewm::TooltipWin(GetAcceleratedWidget()); |
| 173 return scoped_ptr<corewm::Tooltip>(tooltip_); | 173 return make_scoped_ptr(tooltip_); |
| 174 } | 174 } |
| 175 | 175 |
| 176 scoped_ptr<aura::client::DragDropClient> | 176 scoped_ptr<aura::client::DragDropClient> |
| 177 DesktopWindowTreeHostWin::CreateDragDropClient( | 177 DesktopWindowTreeHostWin::CreateDragDropClient( |
| 178 DesktopNativeCursorManager* cursor_manager) { | 178 DesktopNativeCursorManager* cursor_manager) { |
| 179 drag_drop_client_ = new DesktopDragDropClientWin(window(), GetHWND()); | 179 drag_drop_client_ = new DesktopDragDropClientWin(window(), GetHWND()); |
| 180 return scoped_ptr<aura::client::DragDropClient>(drag_drop_client_).Pass(); | 180 return make_scoped_ptr(drag_drop_client_).Pass(); |
|
sky
2015/01/05 17:45:04
no .Pass().
tfarina
2015/01/08 20:43:26
Done.
| |
| 181 } | 181 } |
| 182 | 182 |
| 183 void DesktopWindowTreeHostWin::Close() { | 183 void DesktopWindowTreeHostWin::Close() { |
| 184 // TODO(beng): Move this entire branch to DNWA so it can be shared with X11. | 184 // TODO(beng): Move this entire branch to DNWA so it can be shared with X11. |
| 185 if (should_animate_window_close_) { | 185 if (should_animate_window_close_) { |
| 186 pending_close_ = true; | 186 pending_close_ = true; |
| 187 const bool is_animating = | 187 const bool is_animating = |
| 188 content_window_->layer()->GetAnimator()->IsAnimatingProperty( | 188 content_window_->layer()->GetAnimator()->IsAnimatingProperty( |
| 189 ui::LayerAnimationElement::VISIBILITY); | 189 ui::LayerAnimationElement::VISIBILITY); |
| 190 // Animation may not start for a number of reasons. | 190 // Animation may not start for a number of reasons. |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 995 | 995 |
| 996 // static | 996 // static |
| 997 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 997 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 998 internal::NativeWidgetDelegate* native_widget_delegate, | 998 internal::NativeWidgetDelegate* native_widget_delegate, |
| 999 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 999 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 1000 return new DesktopWindowTreeHostWin(native_widget_delegate, | 1000 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 1001 desktop_native_widget_aura); | 1001 desktop_native_widget_aura); |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 } // namespace views | 1004 } // namespace views |
| OLD | NEW |