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

Side by Side Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1687693002: Rename ConnectToService to ConnectToInterface() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sp2
Patch Set: . Created 4 years, 10 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/mus/public/cpp/lib/window_tree_client_impl.h" 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 void WindowTreeClientImpl::ConnectViaWindowTreeFactory( 160 void WindowTreeClientImpl::ConnectViaWindowTreeFactory(
161 mojo::Shell* shell) { 161 mojo::Shell* shell) {
162 // Clients created with no root shouldn't delete automatically. 162 // Clients created with no root shouldn't delete automatically.
163 delete_on_no_roots_ = false; 163 delete_on_no_roots_ = false;
164 164
165 // The connection id doesn't really matter, we use 101 purely for debugging. 165 // The connection id doesn't really matter, we use 101 purely for debugging.
166 connection_id_ = 101; 166 connection_id_ = 101;
167 167
168 mojom::WindowTreeFactoryPtr factory; 168 mojom::WindowTreeFactoryPtr factory;
169 shell->ConnectToService("mojo:mus", &factory); 169 shell->ConnectToInterface("mojo:mus", &factory);
170 factory->CreateWindowTree(GetProxy(&tree_ptr_), 170 factory->CreateWindowTree(GetProxy(&tree_ptr_),
171 binding_.CreateInterfacePtrAndBind()); 171 binding_.CreateInterfacePtrAndBind());
172 tree_ = tree_ptr_.get(); 172 tree_ = tree_ptr_.get();
173 } 173 }
174 174
175 void WindowTreeClientImpl::WaitForEmbed() { 175 void WindowTreeClientImpl::WaitForEmbed() {
176 DCHECK(roots_.empty()); 176 DCHECK(roots_.empty());
177 // OnEmbed() is the first function called. 177 // OnEmbed() is the first function called.
178 binding_.WaitForIncomingMethodCall(); 178 binding_.WaitForIncomingMethodCall();
179 // TODO(sky): deal with pipe being closed before we get OnEmbed(). 179 // TODO(sky): deal with pipe being closed before we get OnEmbed().
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 929
930 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea( 930 void WindowTreeClientImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea(
931 Window* window, 931 Window* window,
932 const gfx::Vector2d& offset, 932 const gfx::Vector2d& offset,
933 const gfx::Insets& hit_area) { 933 const gfx::Insets& hit_area) {
934 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( 934 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea(
935 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area)); 935 window->id(), offset.x(), offset.y(), mojo::Insets::From(hit_area));
936 } 936 }
937 937
938 } // namespace mus 938 } // namespace mus
OLDNEW
« no previous file with comments | « components/font_service/public/cpp/font_loader.cc ('k') | components/mus/public/cpp/lib/window_tree_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698