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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 native_widget_delegate_->OnNativeWidgetVisibilityChanged(visible); | 742 native_widget_delegate_->OnNativeWidgetVisibilityChanged(visible); |
743 } | 743 } |
744 | 744 |
745 void DesktopRootWindowHostWin::HandleClientSizeChanged( | 745 void DesktopRootWindowHostWin::HandleClientSizeChanged( |
746 const gfx::Size& new_size) { | 746 const gfx::Size& new_size) { |
747 if (root_window_host_delegate_) | 747 if (root_window_host_delegate_) |
748 root_window_host_delegate_->OnHostResized(new_size); | 748 root_window_host_delegate_->OnHostResized(new_size); |
749 } | 749 } |
750 | 750 |
751 void DesktopRootWindowHostWin::HandleFrameChanged() { | 751 void DesktopRootWindowHostWin::HandleFrameChanged() { |
| 752 SetWindowTransparency(); |
752 // Replace the frame and layout the contents. | 753 // Replace the frame and layout the contents. |
753 GetWidget()->non_client_view()->UpdateFrame(true); | 754 GetWidget()->non_client_view()->UpdateFrame(true); |
754 } | 755 } |
755 | 756 |
756 void DesktopRootWindowHostWin::HandleNativeFocus(HWND last_focused_window) { | 757 void DesktopRootWindowHostWin::HandleNativeFocus(HWND last_focused_window) { |
757 // TODO(beng): inform the native_widget_delegate_. | 758 // TODO(beng): inform the native_widget_delegate_. |
758 InputMethod* input_method = GetInputMethod(); | 759 InputMethod* input_method = GetInputMethod(); |
759 if (input_method) | 760 if (input_method) |
760 input_method->OnFocus(); | 761 input_method->OnFocus(); |
761 } | 762 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 } | 882 } |
882 | 883 |
883 HWND DesktopRootWindowHostWin::GetHWND() const { | 884 HWND DesktopRootWindowHostWin::GetHWND() const { |
884 return message_handler_->hwnd(); | 885 return message_handler_->hwnd(); |
885 } | 886 } |
886 | 887 |
887 void DesktopRootWindowHostWin::SetWindowTransparency() { | 888 void DesktopRootWindowHostWin::SetWindowTransparency() { |
888 bool transparent = ShouldUseNativeFrame() && !IsFullscreen(); | 889 bool transparent = ShouldUseNativeFrame() && !IsFullscreen(); |
889 root_window_->compositor()->SetHostHasTransparentBackground(transparent); | 890 root_window_->compositor()->SetHostHasTransparentBackground(transparent); |
890 root_window_->window()->SetTransparent(transparent); | 891 root_window_->window()->SetTransparent(transparent); |
| 892 content_window_->SetTransparent(transparent); |
891 } | 893 } |
892 | 894 |
893 bool DesktopRootWindowHostWin::IsModalWindowActive() const { | 895 bool DesktopRootWindowHostWin::IsModalWindowActive() const { |
894 // This function can get called during window creation which occurs before | 896 // This function can get called during window creation which occurs before |
895 // root_window_ has been created. | 897 // root_window_ has been created. |
896 if (!root_window_) | 898 if (!root_window_) |
897 return false; | 899 return false; |
898 | 900 |
899 aura::Window::Windows::const_iterator index; | 901 aura::Window::Windows::const_iterator index; |
900 for (index = root_window_->window()->children().begin(); | 902 for (index = root_window_->window()->children().begin(); |
(...skipping 11 matching lines...) Expand all Loading... |
912 | 914 |
913 // static | 915 // static |
914 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 916 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
915 internal::NativeWidgetDelegate* native_widget_delegate, | 917 internal::NativeWidgetDelegate* native_widget_delegate, |
916 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 918 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
917 return new DesktopRootWindowHostWin(native_widget_delegate, | 919 return new DesktopRootWindowHostWin(native_widget_delegate, |
918 desktop_native_widget_aura); | 920 desktop_native_widget_aura); |
919 } | 921 } |
920 | 922 |
921 } // namespace views | 923 } // namespace views |
OLD | NEW |