| 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_root_window_host_win.h" | 5 #include "ui/views/widget/desktop_root_window_host_win.h" |
| 6 | 6 |
| 7 #include "third_party/skia/include/core/SkPath.h" | 7 #include "third_party/skia/include/core/SkPath.h" |
| 8 #include "third_party/skia/include/core/SkRegion.h" | 8 #include "third_party/skia/include/core/SkRegion.h" |
| 9 #include "ui/aura/desktop/desktop_activation_client.h" | 9 #include "ui/aura/desktop/desktop_activation_client.h" |
| 10 #include "ui/aura/desktop/desktop_cursor_client.h" | 10 #include "ui/aura/desktop/desktop_cursor_client.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 // TODO(beng): We probably need to move these two calls to some function that | 70 // TODO(beng): We probably need to move these two calls to some function that |
| 71 // can change depending on the native-ness of the frame. For right | 71 // can change depending on the native-ness of the frame. For right |
| 72 // now in the hack-n-slash days of win-aura, we can just | 72 // now in the hack-n-slash days of win-aura, we can just |
| 73 // unilaterally turn this on. | 73 // unilaterally turn this on. |
| 74 root_window_->compositor()->SetHostHasTransparentBackground(true); | 74 root_window_->compositor()->SetHostHasTransparentBackground(true); |
| 75 root_window_->SetTransparent(true); | 75 root_window_->SetTransparent(true); |
| 76 | 76 |
| 77 root_window_->Init(); | 77 root_window_->Init(); |
| 78 root_window_->AddChild(content_window_); | 78 root_window_->AddChild(content_window_); |
| 79 root_window_host_delegate_ = root_window_; | |
| 80 | 79 |
| 81 native_widget_delegate_->OnNativeWidgetCreated(); | 80 native_widget_delegate_->OnNativeWidgetCreated(); |
| 82 | 81 |
| 83 capture_client_.reset(new DesktopCaptureClient); | 82 capture_client_.reset(new DesktopCaptureClient); |
| 84 aura::client::SetCaptureClient(root_window_, capture_client_.get()); | 83 aura::client::SetCaptureClient(root_window_, capture_client_.get()); |
| 85 | 84 |
| 86 focus_manager_.reset(new aura::FocusManager); | 85 focus_manager_.reset(new aura::FocusManager); |
| 87 root_window_->set_focus_manager(focus_manager_.get()); | 86 root_window_->set_focus_manager(focus_manager_.get()); |
| 88 | 87 |
| 89 activation_client_.reset( | 88 activation_client_.reset( |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 message_handler_->InitModalType(modal_type); | 298 message_handler_->InitModalType(modal_type); |
| 300 } | 299 } |
| 301 | 300 |
| 302 void DesktopRootWindowHostWin::FlashFrame(bool flash_frame) { | 301 void DesktopRootWindowHostWin::FlashFrame(bool flash_frame) { |
| 303 message_handler_->FlashFrame(flash_frame); | 302 message_handler_->FlashFrame(flash_frame); |
| 304 } | 303 } |
| 305 | 304 |
| 306 //////////////////////////////////////////////////////////////////////////////// | 305 //////////////////////////////////////////////////////////////////////////////// |
| 307 // DesktopRootWindowHostWin, RootWindowHost implementation: | 306 // DesktopRootWindowHostWin, RootWindowHost implementation: |
| 308 | 307 |
| 308 |
| 309 void DesktopRootWindowHostWin::SetDelegate( |
| 310 aura::RootWindowHostDelegate* delegate) { |
| 311 root_window_host_delegate_ = delegate; |
| 312 } |
| 313 |
| 309 aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() { | 314 aura::RootWindow* DesktopRootWindowHostWin::GetRootWindow() { |
| 310 return root_window_; | 315 return root_window_; |
| 311 } | 316 } |
| 312 | 317 |
| 313 gfx::AcceleratedWidget DesktopRootWindowHostWin::GetAcceleratedWidget() { | 318 gfx::AcceleratedWidget DesktopRootWindowHostWin::GetAcceleratedWidget() { |
| 314 return message_handler_->hwnd(); | 319 return message_handler_->hwnd(); |
| 315 } | 320 } |
| 316 | 321 |
| 317 void DesktopRootWindowHostWin::Show() { | 322 void DesktopRootWindowHostWin::Show() { |
| 318 message_handler_->Show(); | 323 message_handler_->Show(); |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 717 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
| 713 internal::NativeWidgetDelegate* native_widget_delegate, | 718 internal::NativeWidgetDelegate* native_widget_delegate, |
| 714 DesktopNativeWidgetAura* desktop_native_widget_aura, | 719 DesktopNativeWidgetAura* desktop_native_widget_aura, |
| 715 const gfx::Rect& initial_bounds) { | 720 const gfx::Rect& initial_bounds) { |
| 716 return new DesktopRootWindowHostWin(native_widget_delegate, | 721 return new DesktopRootWindowHostWin(native_widget_delegate, |
| 717 desktop_native_widget_aura, | 722 desktop_native_widget_aura, |
| 718 initial_bounds); | 723 initial_bounds); |
| 719 } | 724 } |
| 720 | 725 |
| 721 } // namespace views | 726 } // namespace views |
| OLD | NEW |