| 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/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.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 18 matching lines...) Expand all Loading... |
| 29 #include "ui/views/corewm/tooltip_win.h" | 29 #include "ui/views/corewm/tooltip_win.h" |
| 30 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" | 30 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h" |
| 31 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" | 31 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" |
| 32 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 32 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 33 #include "ui/views/widget/root_view.h" | 33 #include "ui/views/widget/root_view.h" |
| 34 #include "ui/views/widget/widget_delegate.h" | 34 #include "ui/views/widget/widget_delegate.h" |
| 35 #include "ui/views/widget/widget_hwnd_utils.h" | 35 #include "ui/views/widget/widget_hwnd_utils.h" |
| 36 #include "ui/views/win/fullscreen_handler.h" | 36 #include "ui/views/win/fullscreen_handler.h" |
| 37 #include "ui/views/win/hwnd_message_handler.h" | 37 #include "ui/views/win/hwnd_message_handler.h" |
| 38 #include "ui/views/win/hwnd_util.h" | 38 #include "ui/views/win/hwnd_util.h" |
| 39 #include "ui/views/window/native_frame_view.h" |
| 39 #include "ui/wm/core/compound_event_filter.h" | 40 #include "ui/wm/core/compound_event_filter.h" |
| 40 #include "ui/wm/core/window_animations.h" | 41 #include "ui/wm/core/window_animations.h" |
| 41 #include "ui/wm/public/scoped_tooltip_disabler.h" | 42 #include "ui/wm/public/scoped_tooltip_disabler.h" |
| 42 | 43 |
| 43 DECLARE_WINDOW_PROPERTY_TYPE(views::DesktopWindowTreeHostWin*); | 44 DECLARE_WINDOW_PROPERTY_TYPE(views::DesktopWindowTreeHostWin*); |
| 44 | 45 |
| 45 namespace views { | 46 namespace views { |
| 46 | 47 |
| 47 namespace { | 48 namespace { |
| 48 | 49 |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 void DesktopWindowTreeHostWin::EndMoveLoop() { | 408 void DesktopWindowTreeHostWin::EndMoveLoop() { |
| 408 message_handler_->EndMoveLoop(); | 409 message_handler_->EndMoveLoop(); |
| 409 } | 410 } |
| 410 | 411 |
| 411 void DesktopWindowTreeHostWin::SetVisibilityChangedAnimationsEnabled( | 412 void DesktopWindowTreeHostWin::SetVisibilityChangedAnimationsEnabled( |
| 412 bool value) { | 413 bool value) { |
| 413 message_handler_->SetVisibilityChangedAnimationsEnabled(value); | 414 message_handler_->SetVisibilityChangedAnimationsEnabled(value); |
| 414 content_window_->SetProperty(aura::client::kAnimationsDisabledKey, !value); | 415 content_window_->SetProperty(aura::client::kAnimationsDisabledKey, !value); |
| 415 } | 416 } |
| 416 | 417 |
| 418 NonClientFrameView* DesktopWindowTreeHostWin::CreateNonClientFrameView() { |
| 419 return ShouldUseNativeFrame() |
| 420 ? new NativeFrameView(native_widget_delegate_->AsWidget()) |
| 421 : nullptr; |
| 422 } |
| 423 |
| 417 bool DesktopWindowTreeHostWin::ShouldUseNativeFrame() const { | 424 bool DesktopWindowTreeHostWin::ShouldUseNativeFrame() const { |
| 418 return IsTranslucentWindowOpacitySupported(); | 425 return IsTranslucentWindowOpacitySupported(); |
| 419 } | 426 } |
| 420 | 427 |
| 421 bool DesktopWindowTreeHostWin::ShouldWindowContentsBeTransparent() const { | 428 bool DesktopWindowTreeHostWin::ShouldWindowContentsBeTransparent() const { |
| 422 // If the window has a native frame, we assume it is an Aero Glass window, and | 429 // If the window has a native frame, we assume it is an Aero Glass window, and |
| 423 // is therefore transparent. Note: This is not equivalent to calling | 430 // is therefore transparent. Note: This is not equivalent to calling |
| 424 // IsAeroGlassEnabled, because ShouldUseNativeFrame is overridden in a | 431 // IsAeroGlassEnabled, because ShouldUseNativeFrame is overridden in a |
| 425 // subclass. | 432 // subclass. |
| 426 return ShouldUseNativeFrame() && !IsFullscreen(); | 433 return ShouldUseNativeFrame() && !IsFullscreen(); |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 | 993 |
| 987 // static | 994 // static |
| 988 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 995 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 989 internal::NativeWidgetDelegate* native_widget_delegate, | 996 internal::NativeWidgetDelegate* native_widget_delegate, |
| 990 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 997 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 991 return new DesktopWindowTreeHostWin(native_widget_delegate, | 998 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 992 desktop_native_widget_aura); | 999 desktop_native_widget_aura); |
| 993 } | 1000 } |
| 994 | 1001 |
| 995 } // namespace views | 1002 } // namespace views |
| OLD | NEW |