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

Side by Side Diff: content/renderer/mus/render_widget_mus_connection.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
« no previous file with comments | « content/public/browser/mojo_app_connection.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/renderer/mus/render_widget_mus_connection.h" 5 #include "content/renderer/mus/render_widget_mus_connection.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if (window_surface_binding_) { 42 if (window_surface_binding_) {
43 compositor_mus_connection_->AttachSurfaceOnMainThread( 43 compositor_mus_connection_->AttachSurfaceOnMainThread(
44 std::move(window_surface_binding_)); 44 std::move(window_surface_binding_));
45 } 45 }
46 } 46 }
47 47
48 scoped_ptr<cc::OutputSurface> RenderWidgetMusConnection::CreateOutputSurface() { 48 scoped_ptr<cc::OutputSurface> RenderWidgetMusConnection::CreateOutputSurface() {
49 DCHECK(thread_checker_.CalledOnValidThread()); 49 DCHECK(thread_checker_.CalledOnValidThread());
50 DCHECK(!window_surface_binding_); 50 DCHECK(!window_surface_binding_);
51 mus::mojom::GpuPtr gpu_service; 51 mus::mojom::GpuPtr gpu_service;
52 MojoShellConnection::Get()->GetShell()->ConnectToService("mojo:mus", 52 MojoShellConnection::Get()->GetShell()->ConnectToInterface("mojo:mus",
53 &gpu_service); 53 &gpu_service);
54 mus::mojom::CommandBufferPtr cb; 54 mus::mojom::CommandBufferPtr cb;
55 gpu_service->CreateOffscreenGLES2Context(GetProxy(&cb)); 55 gpu_service->CreateOffscreenGLES2Context(GetProxy(&cb));
56 scoped_refptr<cc::ContextProvider> context_provider( 56 scoped_refptr<cc::ContextProvider> context_provider(
57 new mus::ContextProvider(cb.PassInterface().PassHandle())); 57 new mus::ContextProvider(cb.PassInterface().PassHandle()));
58 scoped_ptr<cc::OutputSurface> surface(new mus::OutputSurface( 58 scoped_ptr<cc::OutputSurface> surface(new mus::OutputSurface(
59 context_provider, mus::WindowSurface::Create(&window_surface_binding_))); 59 context_provider, mus::WindowSurface::Create(&window_surface_binding_)));
60 if (compositor_mus_connection_) { 60 if (compositor_mus_connection_) {
61 compositor_mus_connection_->AttachSurfaceOnMainThread( 61 compositor_mus_connection_->AttachSurfaceOnMainThread(
62 std::move(window_surface_binding_)); 62 std::move(window_surface_binding_));
63 } 63 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // event could timeout and we could receive the next event before we ack the 168 // event could timeout and we could receive the next event before we ack the
169 // previous event. 169 // previous event.
170 // DCHECK(pending_ack_.is_null()); 170 // DCHECK(pending_ack_.is_null());
171 pending_ack_ = ack; 171 pending_ack_ = ack;
172 // TODO(fsamuel, sadrul): Track real latency info. 172 // TODO(fsamuel, sadrul): Track real latency info.
173 ui::LatencyInfo latency_info; 173 ui::LatencyInfo latency_info;
174 input_handler_->HandleInputEvent(*input_event, latency_info); 174 input_handler_->HandleInputEvent(*input_event, latency_info);
175 } 175 }
176 176
177 } // namespace content 177 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/mojo_app_connection.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698