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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 | 61 |
62 mus::Window* WindowManagerConnection::NewWindow( | 62 mus::Window* WindowManagerConnection::NewWindow( |
63 const std::map<std::string, std::vector<uint8_t>>& properties) { | 63 const std::map<std::string, std::vector<uint8_t>>& properties) { |
64 return window_tree_connection_->NewTopLevelWindow(&properties); | 64 return window_tree_connection_->NewTopLevelWindow(&properties); |
65 } | 65 } |
66 | 66 |
67 NativeWidget* WindowManagerConnection::CreateNativeWidgetMus( | 67 NativeWidget* WindowManagerConnection::CreateNativeWidgetMus( |
68 const std::map<std::string, std::vector<uint8_t>>& props, | 68 const std::map<std::string, std::vector<uint8_t>>& props, |
69 const Widget::InitParams& init_params, | 69 const Widget::InitParams& init_params, |
70 internal::NativeWidgetDelegate* delegate) { | 70 internal::NativeWidgetDelegate* delegate) { |
71 if (init_params.type == Widget::InitParams::TYPE_CONTROL) | |
72 return nullptr; | |
sky
2016/05/31 17:00:57
Add comment as to what ends up handling this.
sadrul
2016/05/31 17:25:14
Done.
| |
71 std::map<std::string, std::vector<uint8_t>> properties = props; | 73 std::map<std::string, std::vector<uint8_t>> properties = props; |
72 NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties); | 74 NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties); |
73 properties[mus::mojom::WindowManager::kAppID_Property] = | 75 properties[mus::mojom::WindowManager::kAppID_Property] = |
74 mojo::ConvertTo<std::vector<uint8_t>>(identity_.name()); | 76 mojo::ConvertTo<std::vector<uint8_t>>(identity_.name()); |
75 return new NativeWidgetMus(delegate, connector_, NewWindow(properties), | 77 return new NativeWidgetMus(delegate, connector_, NewWindow(properties), |
76 mus::mojom::SurfaceType::DEFAULT); | 78 mus::mojom::SurfaceType::DEFAULT); |
77 } | 79 } |
78 | 80 |
79 void WindowManagerConnection::AddPointerWatcher(PointerWatcher* watcher) { | 81 void WindowManagerConnection::AddPointerWatcher(PointerWatcher* watcher) { |
80 bool had_watcher = HasPointerWatcher(); | 82 bool had_watcher = HasPointerWatcher(); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { | 171 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { |
170 if (window_tree_connection_) | 172 if (window_tree_connection_) |
171 NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get()); | 173 NativeWidgetMus::NotifyFrameChanged(window_tree_connection_.get()); |
172 } | 174 } |
173 | 175 |
174 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { | 176 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { |
175 return window_tree_connection_->GetCursorScreenPoint(); | 177 return window_tree_connection_->GetCursorScreenPoint(); |
176 } | 178 } |
177 | 179 |
178 } // namespace views | 180 } // namespace views |
OLD | NEW |