| 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_root_window_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 void DesktopWindowTreeHostWin::EndMoveLoop() { | 365 void DesktopWindowTreeHostWin::EndMoveLoop() { |
| 366 message_handler_->EndMoveLoop(); | 366 message_handler_->EndMoveLoop(); |
| 367 } | 367 } |
| 368 | 368 |
| 369 void DesktopWindowTreeHostWin::SetVisibilityChangedAnimationsEnabled( | 369 void DesktopWindowTreeHostWin::SetVisibilityChangedAnimationsEnabled( |
| 370 bool value) { | 370 bool value) { |
| 371 message_handler_->SetVisibilityChangedAnimationsEnabled(value); | 371 message_handler_->SetVisibilityChangedAnimationsEnabled(value); |
| 372 content_window_->SetProperty(aura::client::kAnimationsDisabledKey, !value); | 372 content_window_->SetProperty(aura::client::kAnimationsDisabledKey, !value); |
| 373 } | 373 } |
| 374 | 374 |
| 375 bool DesktopWindowTreeHostWin::ShouldUseNativeFrame() { | 375 bool DesktopWindowTreeHostWin::ShouldUseNativeFrame() const { |
| 376 return ui::win::IsAeroGlassEnabled(); | 376 return ui::win::IsAeroGlassEnabled(); |
| 377 } | 377 } |
| 378 | 378 |
| 379 bool DesktopWindowTreeHostWin::ShouldWindowContentsBeTransparent() const { |
| 380 // If the window has a native frame, we assume it is an Aero Glass window, and |
| 381 // is therefore transparent. Note: This is not equivalent to calling |
| 382 // IsAeroGlassEnabled, because ShouldUseNativeFrame is overridden in a |
| 383 // subclass. |
| 384 return ShouldUseNativeFrame(); |
| 385 } |
| 386 |
| 379 void DesktopWindowTreeHostWin::FrameTypeChanged() { | 387 void DesktopWindowTreeHostWin::FrameTypeChanged() { |
| 380 message_handler_->FrameTypeChanged(); | 388 message_handler_->FrameTypeChanged(); |
| 381 SetWindowTransparency(); | 389 SetWindowTransparency(); |
| 382 } | 390 } |
| 383 | 391 |
| 384 NonClientFrameView* DesktopWindowTreeHostWin::CreateNonClientFrameView() { | 392 NonClientFrameView* DesktopWindowTreeHostWin::CreateNonClientFrameView() { |
| 385 return GetWidget()->ShouldUseNativeFrame() ? | 393 return GetWidget()->ShouldUseNativeFrame() ? |
| 386 new NativeFrameView(GetWidget()) : NULL; | 394 new NativeFrameView(GetWidget()) : NULL; |
| 387 } | 395 } |
| 388 | 396 |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 | 1020 |
| 1013 // static | 1021 // static |
| 1014 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 1022 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 1015 internal::NativeWidgetDelegate* native_widget_delegate, | 1023 internal::NativeWidgetDelegate* native_widget_delegate, |
| 1016 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 1024 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 1017 return new DesktopWindowTreeHostWin(native_widget_delegate, | 1025 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 1018 desktop_native_widget_aura); | 1026 desktop_native_widget_aura); |
| 1019 } | 1027 } |
| 1020 | 1028 |
| 1021 } // namespace views | 1029 } // namespace views |
| OLD | NEW |