Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: ui/views/mus/mus_client.cc

Issue 2470963002: Makes it possible for clients to directly create WindowTreeHostMus (Closed)
Patch Set: nuke comment Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/mus/mus_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus_client.h" 5 #include "ui/views/mus/mus_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "services/service_manager/public/cpp/connection.h" 9 #include "services/service_manager/public/cpp/connection.h"
10 #include "services/service_manager/public/cpp/connector.h" 10 #include "services/service_manager/public/cpp/connector.h"
11 #include "services/ui/public/cpp/gpu_service.h" 11 #include "services/ui/public/cpp/gpu_service.h"
12 #include "services/ui/public/interfaces/event_matcher.mojom.h" 12 #include "services/ui/public/interfaces/event_matcher.mojom.h"
13 #include "ui/aura/env.h" 13 #include "ui/aura/env.h"
14 #include "ui/aura/mus/os_exchange_data_provider_mus.h" 14 #include "ui/aura/mus/os_exchange_data_provider_mus.h"
15 #include "ui/aura/mus/property_converter.h" 15 #include "ui/aura/mus/property_converter.h"
16 #include "ui/aura/mus/window_port_mus.h" 16 #include "ui/aura/mus/window_port_mus.h"
17 #include "ui/aura/mus/window_tree_client.h" 17 #include "ui/aura/mus/window_tree_client.h"
18 #include "ui/aura/mus/window_tree_host_mus.h"
18 #include "ui/aura/window.h" 19 #include "ui/aura/window.h"
19 #include "ui/aura/window_tree_host.h" 20 #include "ui/aura/window_tree_host.h"
20 #include "ui/views/mus/aura_init.h" 21 #include "ui/views/mus/aura_init.h"
21 #include "ui/views/mus/clipboard_mus.h" 22 #include "ui/views/mus/clipboard_mus.h"
22 #include "ui/views/mus/screen_mus.h" 23 #include "ui/views/mus/screen_mus.h"
23 #include "ui/views/mus/surface_context_factory.h" 24 #include "ui/views/mus/surface_context_factory.h"
24 #include "ui/views/views_delegate.h" 25 #include "ui/views/views_delegate.h"
25 #include "ui/wm/core/base_focus_rules.h" 26 #include "ui/wm/core/base_focus_rules.h"
26 #include "ui/wm/core/capture_controller.h" 27 #include "ui/wm/core/capture_controller.h"
27 #include "ui/wm/core/focus_controller.h" 28 #include "ui/wm/core/focus_controller.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // TYPE_CONTROL widgets require a NativeWidgetAura. So we let this fall 134 // TYPE_CONTROL widgets require a NativeWidgetAura. So we let this fall
134 // through, so that the default NativeWidgetPrivate::CreateNativeWidget() is 135 // through, so that the default NativeWidgetPrivate::CreateNativeWidget() is
135 // used instead. 136 // used instead.
136 if (init_params.type == Widget::InitParams::TYPE_CONTROL) 137 if (init_params.type == Widget::InitParams::TYPE_CONTROL)
137 return nullptr; 138 return nullptr;
138 return nullptr; 139 return nullptr;
139 } 140 }
140 141
141 std::unique_ptr<aura::WindowPort> MusClient::CreateWindowPort( 142 std::unique_ptr<aura::WindowPort> MusClient::CreateWindowPort(
142 aura::Window* window) { 143 aura::Window* window) {
143 return base::MakeUnique<aura::WindowPortMus>(window_tree_client_.get()); 144 return base::MakeUnique<aura::WindowPortMus>(window_tree_client_.get(),
145 aura::WindowMusType::LOCAL);
144 } 146 }
145 147
146 void MusClient::OnEmbed(aura::Window* root) {} 148 void MusClient::OnEmbed(
149 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) {}
147 150
148 void MusClient::OnLostConnection(aura::WindowTreeClient* client) {} 151 void MusClient::OnLostConnection(aura::WindowTreeClient* client) {}
149 152
150 void MusClient::OnEmbedRootDestroyed(aura::Window* root) { 153 void MusClient::OnEmbedRootDestroyed(aura::Window* root) {
151 // Not called for MusClient as WindowTreeClient isn't created by 154 // Not called for MusClient as WindowTreeClient isn't created by
152 // way of an Embed(). 155 // way of an Embed().
153 NOTREACHED(); 156 NOTREACHED();
154 } 157 }
155 158
156 void MusClient::OnPointerEventObserved(const ui::PointerEvent& event, 159 void MusClient::OnPointerEventObserved(const ui::PointerEvent& event,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return root->GetTopWindowContainingPoint(relative_point); 195 return root->GetTopWindowContainingPoint(relative_point);
193 } 196 }
194 return nullptr; 197 return nullptr;
195 } 198 }
196 199
197 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { 200 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() {
198 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); 201 return base::MakeUnique<aura::OSExchangeDataProviderMus>();
199 } 202 }
200 203
201 } // namespace views 204 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/mus_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698