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_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ui/aura/client/activation_client.h" | 8 #include "ui/aura/client/activation_client.h" |
9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 // CEF sets focus to the window the user clicks down on. | 357 // CEF sets focus to the window the user clicks down on. |
358 // TODO(beng): see if we can't do this some other way. CEF seems a heavy- | 358 // TODO(beng): see if we can't do this some other way. CEF seems a heavy- |
359 // handed way of accomplishing focus. | 359 // handed way of accomplishing focus. |
360 // No event filter for aura::Env. Create CompoundEvnetFilter per RootWindow. | 360 // No event filter for aura::Env. Create CompoundEvnetFilter per RootWindow. |
361 root_window_event_filter_ = new corewm::CompoundEventFilter; | 361 root_window_event_filter_ = new corewm::CompoundEventFilter; |
362 // Pass ownership of the filter to the root_window. | 362 // Pass ownership of the filter to the root_window. |
363 root_window_->SetEventFilter(root_window_event_filter_); | 363 root_window_->SetEventFilter(root_window_event_filter_); |
364 | 364 |
365 desktop_root_window_host_->OnRootWindowCreated(root_window_.get(), params); | 365 desktop_root_window_host_->OnRootWindowCreated(root_window_.get(), params); |
366 | 366 |
367 native_widget_delegate_->OnNativeWidgetCreated(true); | |
368 | |
369 UpdateWindowTransparency(); | 367 UpdateWindowTransparency(); |
370 | 368 |
371 capture_client_.reset(new DesktopCaptureClient(root_window_.get())); | 369 capture_client_.reset(new DesktopCaptureClient(root_window_.get())); |
372 | 370 |
373 corewm::FocusController* focus_controller = | 371 corewm::FocusController* focus_controller = |
374 new corewm::FocusController(new DesktopFocusRules(content_window_)); | 372 new corewm::FocusController(new DesktopFocusRules(content_window_)); |
375 focus_client_.reset(focus_controller); | 373 focus_client_.reset(focus_controller); |
376 aura::client::SetFocusClient(root_window_.get(), focus_controller); | 374 aura::client::SetFocusClient(root_window_.get(), focus_controller); |
377 aura::client::SetActivationClient(root_window_.get(), focus_controller); | 375 aura::client::SetActivationClient(root_window_.get(), focus_controller); |
378 root_window_->AddPreTargetHandler(focus_controller); | 376 root_window_->AddPreTargetHandler(focus_controller); |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 input_method_event_filter_->SetInputMethodPropertyInRootWindow( | 1083 input_method_event_filter_->SetInputMethodPropertyInRootWindow( |
1086 root_window_.get()); | 1084 root_window_.get()); |
1087 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); | 1085 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); |
1088 } | 1086 } |
1089 | 1087 |
1090 void DesktopNativeWidgetAura::UpdateWindowTransparency() { | 1088 void DesktopNativeWidgetAura::UpdateWindowTransparency() { |
1091 content_window_->SetTransparent(ShouldUseNativeFrame()); | 1089 content_window_->SetTransparent(ShouldUseNativeFrame()); |
1092 } | 1090 } |
1093 | 1091 |
1094 } // namespace views | 1092 } // namespace views |
OLD | NEW |