Chromium Code Reviews| 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 <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 | 160 |
| 161 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { | 161 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { |
| 162 if (client_) | 162 if (client_) |
| 163 NativeWidgetMus::NotifyFrameChanged(client_.get()); | 163 NativeWidgetMus::NotifyFrameChanged(client_.get()); |
| 164 } | 164 } |
| 165 | 165 |
| 166 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { | 166 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { |
| 167 return client_->GetCursorScreenPoint(); | 167 return client_->GetCursorScreenPoint(); |
| 168 } | 168 } |
| 169 | 169 |
| 170 ui::Window* WindowManagerConnection::GetWindowAtScreenPoint( | |
| 171 const gfx::Point& point) { | |
| 172 for (ui::Window* root : GetRoots()) { | |
| 173 if (root->bounds().Contains(point)) | |
|
sky
2016/10/05 16:10:52
Don't you want to recurse? Also, you should offset
Elliot Glaysher
2016/10/06 18:00:08
Done.
| |
| 174 return root; | |
| 175 } | |
| 176 return nullptr; | |
| 177 } | |
| 178 | |
| 170 std::unique_ptr<OSExchangeData::Provider> | 179 std::unique_ptr<OSExchangeData::Provider> |
| 171 WindowManagerConnection::BuildProvider() { | 180 WindowManagerConnection::BuildProvider() { |
| 172 return base::MakeUnique<OSExchangeDataProviderMus>(); | 181 return base::MakeUnique<OSExchangeDataProviderMus>(); |
| 173 } | 182 } |
| 174 | 183 |
| 175 } // namespace views | 184 } // namespace views |
| OLD | NEW |