Index: components/html_viewer/html_document.cc |
diff --git a/components/html_viewer/html_document.cc b/components/html_viewer/html_document.cc |
index ab68283844dfc85414450032314ec9cf70bb8d62..e2177fe9c21ff3526f3fc658bdde28398abc537b 100644 |
--- a/components/html_viewer/html_document.cc |
+++ b/components/html_viewer/html_document.cc |
@@ -206,6 +206,8 @@ void HTMLDocument::OnEmbed(View* root) { |
DCHECK(!global_state_->is_headless()); |
root_ = root; |
root_->AddObserver(this); |
+ root_->RequestCompositorFrameReceiver( |
+ compositor_frame_receiver_request_.Pass()); |
UpdateFocus(); |
InitGlobalStateAndLoadIfNecessary(); |
@@ -303,10 +305,8 @@ void HTMLDocument::initializeLayerTreeView() { |
return; |
} |
- mojo::URLRequestPtr request(mojo::URLRequest::New()); |
- request->url = mojo::String::From("mojo:view_manager"); |
- mojo::SurfacePtr surface; |
- html_document_app_->ConnectToService(request.Pass(), &surface); |
+ mojo::CompositorFrameReceiverPtr receiver; |
+ compositor_frame_receiver_request_ = GetProxy(&receiver); |
// TODO(jamesr): Should be mojo:gpu_service |
mojo::URLRequestPtr request2(mojo::URLRequest::New()); |
@@ -317,7 +317,7 @@ void HTMLDocument::initializeLayerTreeView() { |
global_state_->compositor_thread(), |
global_state_->gpu_memory_buffer_manager(), |
global_state_->raster_thread_helper()->task_graph_runner(), |
- surface.Pass(), gpu_service.Pass())); |
+ receiver.Pass(), gpu_service.Pass())); |
} |
blink::WebLayerTreeView* HTMLDocument::layerTreeView() { |