| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/mus/window_manager_connection.h" | 5 #include "ui/views/mus/window_manager_connection.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 | 77 |
| 78 WindowManagerConnection::WindowManagerConnection( | 78 WindowManagerConnection::WindowManagerConnection( |
| 79 shell::Connector* connector, | 79 shell::Connector* connector, |
| 80 const shell::Identity& identity) | 80 const shell::Identity& identity) |
| 81 : connector_(connector), | 81 : connector_(connector), |
| 82 identity_(identity), | 82 identity_(identity), |
| 83 window_tree_connection_(nullptr) { | 83 window_tree_connection_(nullptr) { |
| 84 window_tree_connection_.reset( | 84 window_tree_connection_.reset( |
| 85 mus::WindowTreeConnection::Create(this, connector_)); | 85 mus::WindowTreeConnection::Create(this, connector_)); |
| 86 window_tree_connection_->InitializeCursorLocation(); |
| 86 | 87 |
| 87 screen_.reset(new ScreenMus(this)); | 88 screen_.reset(new ScreenMus(this)); |
| 88 screen_->Init(connector); | 89 screen_->Init(connector); |
| 89 | 90 |
| 90 // TODO(sad): We should have a DeviceDataManager implementation that talks to | 91 // TODO(sad): We should have a DeviceDataManager implementation that talks to |
| 91 // a mojo service to learn about the input-devices on the system. | 92 // a mojo service to learn about the input-devices on the system. |
| 92 // http://crbug.com/601981 | 93 // http://crbug.com/601981 |
| 93 ui::DeviceDataManager::CreateInstance(); | 94 ui::DeviceDataManager::CreateInstance(); |
| 94 | 95 |
| 95 ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind( | 96 ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind( |
| (...skipping 13 matching lines...) Expand all Loading... |
| 109 void WindowManagerConnection::OnEmbed(mus::Window* root) {} | 110 void WindowManagerConnection::OnEmbed(mus::Window* root) {} |
| 110 | 111 |
| 111 void WindowManagerConnection::OnConnectionLost( | 112 void WindowManagerConnection::OnConnectionLost( |
| 112 mus::WindowTreeConnection* connection) {} | 113 mus::WindowTreeConnection* connection) {} |
| 113 | 114 |
| 114 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { | 115 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { |
| 115 if (window_tree_connection_) | 116 if (window_tree_connection_) |
| 116 NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get()); | 117 NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get()); |
| 117 } | 118 } |
| 118 | 119 |
| 120 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { |
| 121 return window_tree_connection_->GetCursorScreenPoint(); |
| 122 } |
| 123 |
| 119 } // namespace views | 124 } // namespace views |
| OLD | NEW |