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