| 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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 internal::NativeWidgetDelegate* delegate) { | 89 internal::NativeWidgetDelegate* delegate) { |
| 90 // TYPE_CONTROL widgets require a NativeWidgetAura. So we let this fall | 90 // TYPE_CONTROL widgets require a NativeWidgetAura. So we let this fall |
| 91 // through, so that the default NativeWidgetPrivate::CreateNativeWidget() is | 91 // through, so that the default NativeWidgetPrivate::CreateNativeWidget() is |
| 92 // used instead. | 92 // used instead. |
| 93 if (init_params.type == Widget::InitParams::TYPE_CONTROL) | 93 if (init_params.type == Widget::InitParams::TYPE_CONTROL) |
| 94 return nullptr; | 94 return nullptr; |
| 95 std::map<std::string, std::vector<uint8_t>> properties = props; | 95 std::map<std::string, std::vector<uint8_t>> properties = props; |
| 96 NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties); | 96 NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties); |
| 97 properties[ui::mojom::WindowManager::kAppID_Property] = | 97 properties[ui::mojom::WindowManager::kAppID_Property] = |
| 98 mojo::ConvertTo<std::vector<uint8_t>>(identity_.name()); | 98 mojo::ConvertTo<std::vector<uint8_t>>(identity_.name()); |
| 99 return new NativeWidgetMus(delegate, NewWindow(properties), | 99 NativeWidgetMus* native_widget = new NativeWidgetMus( |
| 100 ui::mojom::SurfaceType::DEFAULT); | 100 delegate, NewWindow(properties), ui::mojom::SurfaceType::DEFAULT); |
| 101 native_widget->window_tree_host()->InitInputMethod(connector_); |
| 102 return native_widget; |
| 101 } | 103 } |
| 102 | 104 |
| 103 const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const { | 105 const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const { |
| 104 return client_->GetRoots(); | 106 return client_->GetRoots(); |
| 105 } | 107 } |
| 106 | 108 |
| 107 WindowManagerConnection::WindowManagerConnection( | 109 WindowManagerConnection::WindowManagerConnection( |
| 108 shell::Connector* connector, | 110 shell::Connector* connector, |
| 109 const shell::Identity& identity) | 111 const shell::Identity& identity) |
| 110 : connector_(connector), identity_(identity) { | 112 : connector_(connector), identity_(identity) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { | 162 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { |
| 161 return client_->GetCursorScreenPoint(); | 163 return client_->GetCursorScreenPoint(); |
| 162 } | 164 } |
| 163 | 165 |
| 164 std::unique_ptr<OSExchangeData::Provider> | 166 std::unique_ptr<OSExchangeData::Provider> |
| 165 WindowManagerConnection::BuildProvider() { | 167 WindowManagerConnection::BuildProvider() { |
| 166 return base::MakeUnique<OSExchangeDataProviderMus>(); | 168 return base::MakeUnique<OSExchangeDataProviderMus>(); |
| 167 } | 169 } |
| 168 | 170 |
| 169 } // namespace views | 171 } // namespace views |
| OLD | NEW |