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

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

Issue 2495423005: Enables passing initial properties to top level window creation (Closed)
Patch Set: cleanup 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
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"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return nullptr; 65 return nullptr;
66 } 66 }
67 67
68 DesktopNativeWidgetAura* native_widget = 68 DesktopNativeWidgetAura* native_widget =
69 new DesktopNativeWidgetAura(delegate); 69 new DesktopNativeWidgetAura(delegate);
70 if (init_params.desktop_window_tree_host) { 70 if (init_params.desktop_window_tree_host) {
71 native_widget->SetDesktopWindowTreeHost( 71 native_widget->SetDesktopWindowTreeHost(
72 base::WrapUnique(init_params.desktop_window_tree_host)); 72 base::WrapUnique(init_params.desktop_window_tree_host));
73 } else { 73 } else {
74 native_widget->SetDesktopWindowTreeHost( 74 native_widget->SetDesktopWindowTreeHost(
75 base::MakeUnique<DesktopWindowTreeHostMus>(delegate, native_widget)); 75 base::MakeUnique<DesktopWindowTreeHostMus>(delegate, native_widget,
76 init_params));
76 } 77 }
77 return native_widget; 78 return native_widget;
78 } 79 }
79 80
80 MusClient::MusClient(service_manager::Connector* connector, 81 MusClient::MusClient(service_manager::Connector* connector,
81 const service_manager::Identity& identity, 82 const service_manager::Identity& identity,
82 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) 83 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
83 : connector_(connector), identity_(identity) { 84 : connector_(connector), identity_(identity) {
84 DCHECK(!instance_); 85 DCHECK(!instance_);
85 instance_ = this; 86 instance_ = this;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 return root->GetTopWindowContainingPoint(relative_point); 161 return root->GetTopWindowContainingPoint(relative_point);
161 } 162 }
162 return nullptr; 163 return nullptr;
163 } 164 }
164 165
165 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { 166 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() {
166 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); 167 return base::MakeUnique<aura::OSExchangeDataProviderMus>();
167 } 168 }
168 169
169 } // namespace views 170 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698