| 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 "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "ui/aura/client/activation_client.h" | 9 #include "ui/aura/client/activation_client.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 new corewm::FocusController(new DesktopFocusRules(content_window_)); | 463 new corewm::FocusController(new DesktopFocusRules(content_window_)); |
| 464 focus_client_.reset(focus_controller); | 464 focus_client_.reset(focus_controller); |
| 465 aura::client::SetFocusClient(host_->window(), focus_controller); | 465 aura::client::SetFocusClient(host_->window(), focus_controller); |
| 466 aura::client::SetActivationClient(host_->window(), focus_controller); | 466 aura::client::SetActivationClient(host_->window(), focus_controller); |
| 467 host_->window()->AddPreTargetHandler(focus_controller); | 467 host_->window()->AddPreTargetHandler(focus_controller); |
| 468 | 468 |
| 469 dispatcher_client_.reset(new DesktopDispatcherClient); | 469 dispatcher_client_.reset(new DesktopDispatcherClient); |
| 470 aura::client::SetDispatcherClient(host_->window(), | 470 aura::client::SetDispatcherClient(host_->window(), |
| 471 dispatcher_client_.get()); | 471 dispatcher_client_.get()); |
| 472 | 472 |
| 473 position_client_.reset(new DesktopScreenPositionClient()); | 473 position_client_.reset(new DesktopScreenPositionClient(host_->window())); |
| 474 aura::client::SetScreenPositionClient(host_->window(), | |
| 475 position_client_.get()); | |
| 476 | 474 |
| 477 InstallInputMethodEventFilter(); | 475 InstallInputMethodEventFilter(); |
| 478 | 476 |
| 479 drag_drop_client_ = desktop_window_tree_host_->CreateDragDropClient( | 477 drag_drop_client_ = desktop_window_tree_host_->CreateDragDropClient( |
| 480 native_cursor_manager_); | 478 native_cursor_manager_); |
| 481 aura::client::SetDragDropClient(host_->window(), | 479 aura::client::SetDragDropClient(host_->window(), |
| 482 drag_drop_client_.get()); | 480 drag_drop_client_.get()); |
| 483 | 481 |
| 484 static_cast<aura::client::FocusClient*>(focus_client_.get())-> | 482 static_cast<aura::client::FocusClient*>(focus_client_.get())-> |
| 485 FocusWindow(content_window_); | 483 FocusWindow(content_window_); |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 if (cursor_reference_count_ == 0) { | 1189 if (cursor_reference_count_ == 0) { |
| 1192 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1190 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
| 1193 // for cleaning up |cursor_manager_|. | 1191 // for cleaning up |cursor_manager_|. |
| 1194 delete cursor_manager_; | 1192 delete cursor_manager_; |
| 1195 native_cursor_manager_ = NULL; | 1193 native_cursor_manager_ = NULL; |
| 1196 cursor_manager_ = NULL; | 1194 cursor_manager_ = NULL; |
| 1197 } | 1195 } |
| 1198 } | 1196 } |
| 1199 | 1197 |
| 1200 } // namespace views | 1198 } // namespace views |
| OLD | NEW |