| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // TYPE_CONTROL widgets require a NativeWidgetAura. So we let this fall | 124 // TYPE_CONTROL widgets require a NativeWidgetAura. So we let this fall |
| 125 // through, so that the default NativeWidgetPrivate::CreateNativeWidget() is | 125 // through, so that the default NativeWidgetPrivate::CreateNativeWidget() is |
| 126 // used instead. | 126 // used instead. |
| 127 if (init_params.type == Widget::InitParams::TYPE_CONTROL) | 127 if (init_params.type == Widget::InitParams::TYPE_CONTROL) |
| 128 return nullptr; | 128 return nullptr; |
| 129 std::map<std::string, std::vector<uint8_t>> properties = props; | 129 std::map<std::string, std::vector<uint8_t>> properties = props; |
| 130 NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties); | 130 NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties); |
| 131 properties[ui::mojom::WindowManager::kAppID_Property] = | 131 properties[ui::mojom::WindowManager::kAppID_Property] = |
| 132 mojo::ConvertTo<std::vector<uint8_t>>(identity_.name()); | 132 mojo::ConvertTo<std::vector<uint8_t>>(identity_.name()); |
| 133 return new NativeWidgetMus(delegate, NewTopLevelWindow(properties), | 133 return new NativeWidgetMus(delegate, NewTopLevelWindow(properties), |
| 134 ui::mojom::SurfaceType::DEFAULT); | 134 ui::mojom::CompositorFrameSinkType::DEFAULT); |
| 135 } | 135 } |
| 136 | 136 |
| 137 const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const { | 137 const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const { |
| 138 return client_->GetRoots(); | 138 return client_->GetRoots(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 WindowManagerConnection::WindowManagerConnection( | 141 WindowManagerConnection::WindowManagerConnection( |
| 142 service_manager::Connector* connector, | 142 service_manager::Connector* connector, |
| 143 const service_manager::Identity& identity, | 143 const service_manager::Identity& identity, |
| 144 scoped_refptr<base::SingleThreadTaskRunner> task_runner) | 144 scoped_refptr<base::SingleThreadTaskRunner> task_runner) |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 std::copy(roots.begin(), roots.end(), std::back_inserter(windows)); | 210 std::copy(roots.begin(), roots.end(), std::back_inserter(windows)); |
| 211 return GetWindowFrom(display_origins, windows, point); | 211 return GetWindowFrom(display_origins, windows, point); |
| 212 } | 212 } |
| 213 | 213 |
| 214 std::unique_ptr<OSExchangeData::Provider> | 214 std::unique_ptr<OSExchangeData::Provider> |
| 215 WindowManagerConnection::BuildProvider() { | 215 WindowManagerConnection::BuildProvider() { |
| 216 return base::MakeUnique<OSExchangeDataProviderMus>(); | 216 return base::MakeUnique<OSExchangeDataProviderMus>(); |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace views | 219 } // namespace views |
| OLD | NEW |