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

Side by Side Diff: content/renderer/mus/render_widget_mus_connection.cc

Issue 2096643002: Eliminate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mah3
Patch Set: . Created 4 years, 6 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 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"
11 #include "components/mus/public/cpp/context_provider.h" 11 #include "components/mus/public/cpp/context_provider.h"
12 #include "components/mus/public/cpp/output_surface.h" 12 #include "components/mus/public/cpp/output_surface.h"
13 #include "components/mus/public/cpp/surfaces/surfaces_utils.h" 13 #include "components/mus/public/cpp/surfaces/surfaces_utils.h"
14 #include "components/mus/public/interfaces/command_buffer.mojom.h" 14 #include "components/mus/public/interfaces/command_buffer.mojom.h"
15 #include "components/mus/public/interfaces/surface.mojom.h" 15 #include "components/mus/public/interfaces/surface.mojom.h"
16 #include "components/mus/public/interfaces/window_tree.mojom.h" 16 #include "components/mus/public/interfaces/window_tree.mojom.h"
17 #include "content/public/child/child_thread.h"
17 #include "content/public/common/mojo_shell_connection.h" 18 #include "content/public/common/mojo_shell_connection.h"
18 #include "content/renderer/mus/compositor_mus_connection.h" 19 #include "content/renderer/mus/compositor_mus_connection.h"
19 #include "content/renderer/render_thread_impl.h" 20 #include "content/renderer/render_thread_impl.h"
20 #include "content/renderer/render_view_impl.h" 21 #include "content/renderer/render_view_impl.h"
21 #include "services/shell/public/cpp/connector.h" 22 #include "services/shell/public/cpp/connector.h"
22 23
23 namespace content { 24 namespace content {
24 25
25 namespace { 26 namespace {
26 27
(...skipping 14 matching lines...) Expand all
41 compositor_mus_connection_->AttachSurfaceOnMainThread( 42 compositor_mus_connection_->AttachSurfaceOnMainThread(
42 std::move(window_surface_binding_)); 43 std::move(window_surface_binding_));
43 } 44 }
44 } 45 }
45 46
46 std::unique_ptr<cc::OutputSurface> 47 std::unique_ptr<cc::OutputSurface>
47 RenderWidgetMusConnection::CreateOutputSurface() { 48 RenderWidgetMusConnection::CreateOutputSurface() {
48 DCHECK(thread_checker_.CalledOnValidThread()); 49 DCHECK(thread_checker_.CalledOnValidThread());
49 DCHECK(!window_surface_binding_); 50 DCHECK(!window_surface_binding_);
50 scoped_refptr<cc::ContextProvider> context_provider(new mus::ContextProvider( 51 scoped_refptr<cc::ContextProvider> context_provider(new mus::ContextProvider(
51 MojoShellConnection::GetForProcess()->GetConnector())); 52 ChildThread::Get()->GetMojoShellConnection()->GetConnector()));
52 53
53 std::unique_ptr<cc::OutputSurface> surface(new mus::OutputSurface( 54 std::unique_ptr<cc::OutputSurface> surface(new mus::OutputSurface(
54 context_provider, mus::WindowSurface::Create(&window_surface_binding_))); 55 context_provider, mus::WindowSurface::Create(&window_surface_binding_)));
55 if (compositor_mus_connection_) { 56 if (compositor_mus_connection_) {
56 compositor_mus_connection_->AttachSurfaceOnMainThread( 57 compositor_mus_connection_->AttachSurfaceOnMainThread(
57 std::move(window_surface_binding_)); 58 std::move(window_surface_binding_));
58 } 59 }
59 return surface; 60 return surface;
60 } 61 }
61 62
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // previous event. 172 // previous event.
172 // DCHECK(pending_ack_.is_null()); 173 // DCHECK(pending_ack_.is_null());
173 pending_ack_ = ack; 174 pending_ack_ = ack;
174 // TODO(fsamuel, sadrul): Track real latency info. 175 // TODO(fsamuel, sadrul): Track real latency info.
175 ui::LatencyInfo latency_info; 176 ui::LatencyInfo latency_info;
176 input_handler_->HandleInputEvent(*input_event, latency_info, 177 input_handler_->HandleInputEvent(*input_event, latency_info,
177 DISPATCH_TYPE_BLOCKING); 178 DISPATCH_TYPE_BLOCKING);
178 } 179 }
179 180
180 } // namespace content 181 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/mus/BUILD.gn ('k') | content/renderer/mus/render_widget_window_tree_client_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698