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

Side by Side Diff: mojo/services/html_viewer/html_document.cc

Issue 869343004: Remove use of mojo.SurfacesService interface in html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « mojo/cc/output_surface_mojo.cc ('k') | mojo/services/html_viewer/weblayertreeview_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 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 "mojo/services/html_viewer/html_document.h" 5 #include "mojo/services/html_viewer/html_document.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 blink::WebStorageNamespace* HTMLDocument::createSessionStorageNamespace() { 173 blink::WebStorageNamespace* HTMLDocument::createSessionStorageNamespace() {
174 return new WebStorageNamespaceImpl(); 174 return new WebStorageNamespaceImpl();
175 } 175 }
176 176
177 void HTMLDocument::initializeLayerTreeView() { 177 void HTMLDocument::initializeLayerTreeView() {
178 ServiceProviderPtr surfaces_service_provider; 178 ServiceProviderPtr surfaces_service_provider;
179 shell_->ConnectToApplication("mojo:surfaces_service", 179 shell_->ConnectToApplication("mojo:surfaces_service",
180 GetProxy(&surfaces_service_provider), nullptr); 180 GetProxy(&surfaces_service_provider), nullptr);
181 mojo::SurfacesServicePtr surfaces_service; 181 mojo::SurfacePtr surface;
182 ConnectToService(surfaces_service_provider.get(), &surfaces_service); 182 ConnectToService(surfaces_service_provider.get(), &surface);
183 183
184 ServiceProviderPtr gpu_service_provider; 184 ServiceProviderPtr gpu_service_provider;
185 // TODO(jamesr): Should be mojo:gpu_service 185 // TODO(jamesr): Should be mojo:gpu_service
186 shell_->ConnectToApplication("mojo:native_viewport_service", 186 shell_->ConnectToApplication("mojo:native_viewport_service",
187 GetProxy(&gpu_service_provider), nullptr); 187 GetProxy(&gpu_service_provider), nullptr);
188 mojo::GpuPtr gpu_service; 188 mojo::GpuPtr gpu_service;
189 ConnectToService(gpu_service_provider.get(), &gpu_service); 189 ConnectToService(gpu_service_provider.get(), &gpu_service);
190 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( 190 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl(
191 compositor_thread_, surfaces_service.Pass(), gpu_service.Pass())); 191 compositor_thread_, surface.Pass(), gpu_service.Pass()));
192 } 192 }
193 193
194 blink::WebLayerTreeView* HTMLDocument::layerTreeView() { 194 blink::WebLayerTreeView* HTMLDocument::layerTreeView() {
195 return web_layer_tree_view_impl_.get(); 195 return web_layer_tree_view_impl_.get();
196 } 196 }
197 197
198 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( 198 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer(
199 blink::WebLocalFrame* frame, 199 blink::WebLocalFrame* frame,
200 const blink::WebURL& url, 200 const blink::WebURL& url,
201 blink::WebMediaPlayerClient* client) { 201 blink::WebMediaPlayerClient* client) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 297 }
298 298
299 void HTMLDocument::OnViewInputEvent(View* view, const mojo::EventPtr& event) { 299 void HTMLDocument::OnViewInputEvent(View* view, const mojo::EventPtr& event) {
300 scoped_ptr<blink::WebInputEvent> web_event = 300 scoped_ptr<blink::WebInputEvent> web_event =
301 event.To<scoped_ptr<blink::WebInputEvent>>(); 301 event.To<scoped_ptr<blink::WebInputEvent>>();
302 if (web_event) 302 if (web_event)
303 web_view_->handleInputEvent(*web_event); 303 web_view_->handleInputEvent(*web_event);
304 } 304 }
305 305
306 } // namespace html_viewer 306 } // namespace html_viewer
OLDNEW
« no previous file with comments | « mojo/cc/output_surface_mojo.cc ('k') | mojo/services/html_viewer/weblayertreeview_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698