Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: ui/views/widget/desktop_root_window_host_win.cc

Issue 11047012: Wiring metro mouse events to aura viewer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/desktop_root_window_host_win.h ('k') | win8/metro_driver/chrome_app_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_root_window_host_win.h ('k') | win8/metro_driver/chrome_app_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698