| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 message_handler_->Init(parent_hwnd, pixel_bounds); | 144 message_handler_->Init(parent_hwnd, pixel_bounds); |
| 145 | 145 |
| 146 rw_create_params->host = this; | 146 rw_create_params->host = this; |
| 147 } | 147 } |
| 148 | 148 |
| 149 void DesktopRootWindowHostWin::OnRootWindowCreated( | 149 void DesktopRootWindowHostWin::OnRootWindowCreated( |
| 150 aura::RootWindow* root, | 150 aura::RootWindow* root, |
| 151 const Widget::InitParams& params) { | 151 const Widget::InitParams& params) { |
| 152 root_window_ = root; | 152 root_window_ = root; |
| 153 | 153 |
| 154 // The cursor is not necessarily visible when the root window is created. |
| 155 aura::client::CursorClient* cursor_client = |
| 156 aura::client::GetCursorClient(root_window_->window()); |
| 157 if (cursor_client) |
| 158 is_cursor_visible_ = cursor_client->IsCursorVisible(); |
| 159 |
| 154 root_window_->window()->SetProperty(kContentWindowForRootWindow, | 160 root_window_->window()->SetProperty(kContentWindowForRootWindow, |
| 155 content_window_); | 161 content_window_); |
| 156 root_window_->window()->SetProperty(kDesktopRootWindowHostKey, this); | 162 root_window_->window()->SetProperty(kDesktopRootWindowHostKey, this); |
| 157 | 163 |
| 158 should_animate_window_close_ = | 164 should_animate_window_close_ = |
| 159 content_window_->type() != aura::client::WINDOW_TYPE_NORMAL && | 165 content_window_->type() != aura::client::WINDOW_TYPE_NORMAL && |
| 160 !views::corewm::WindowAnimationsDisabled(content_window_); | 166 !views::corewm::WindowAnimationsDisabled(content_window_); |
| 161 | 167 |
| 162 // TODO this is not invoked *after* Init(), but should be ok. | 168 // TODO this is not invoked *after* Init(), but should be ok. |
| 163 SetWindowTransparency(); | 169 SetWindowTransparency(); |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 | 969 |
| 964 // static | 970 // static |
| 965 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 971 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
| 966 internal::NativeWidgetDelegate* native_widget_delegate, | 972 internal::NativeWidgetDelegate* native_widget_delegate, |
| 967 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 973 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 968 return new DesktopRootWindowHostWin(native_widget_delegate, | 974 return new DesktopRootWindowHostWin(native_widget_delegate, |
| 969 desktop_native_widget_aura); | 975 desktop_native_widget_aura); |
| 970 } | 976 } |
| 971 | 977 |
| 972 } // namespace views | 978 } // namespace views |
| OLD | NEW |