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

Side by Side Diff: components/html_viewer/html_document.cc

Issue 1181013010: Support impl-side painting in Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit warning Created 5 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 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/html_viewer/html_document.h" 5 #include "components/html_viewer/html_document.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 web_layer_tree_view_impl_->set_view(root_); 283 web_layer_tree_view_impl_->set_view(root_);
284 } 284 }
285 285
286 blink::WebStorageNamespace* HTMLDocument::createSessionStorageNamespace() { 286 blink::WebStorageNamespace* HTMLDocument::createSessionStorageNamespace() {
287 return new WebStorageNamespaceImpl(); 287 return new WebStorageNamespaceImpl();
288 } 288 }
289 289
290 void HTMLDocument::initializeLayerTreeView() { 290 void HTMLDocument::initializeLayerTreeView() {
291 if (setup_->is_headless()) { 291 if (setup_->is_headless()) {
292 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( 292 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl(
293 setup_->compositor_thread(), nullptr, nullptr)); 293 setup_->compositor_thread(), nullptr, nullptr, nullptr, nullptr));
294 return; 294 return;
295 } 295 }
296 296
297 mojo::URLRequestPtr request(mojo::URLRequest::New()); 297 mojo::URLRequestPtr request(mojo::URLRequest::New());
298 request->url = mojo::String::From("mojo:surfaces_service"); 298 request->url = mojo::String::From("mojo:surfaces_service");
299 mojo::SurfacePtr surface; 299 mojo::SurfacePtr surface;
300 html_document_app_->ConnectToService(request.Pass(), &surface); 300 html_document_app_->ConnectToService(request.Pass(), &surface);
301 301
302 // TODO(jamesr): Should be mojo:gpu_service 302 // TODO(jamesr): Should be mojo:gpu_service
303 mojo::URLRequestPtr request2(mojo::URLRequest::New()); 303 mojo::URLRequestPtr request2(mojo::URLRequest::New());
304 request2->url = mojo::String::From("mojo:view_manager"); 304 request2->url = mojo::String::From("mojo:view_manager");
305 mojo::GpuPtr gpu_service; 305 mojo::GpuPtr gpu_service;
306 html_document_app_->ConnectToService(request2.Pass(), &gpu_service); 306 html_document_app_->ConnectToService(request2.Pass(), &gpu_service);
307 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( 307 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl(
308 setup_->compositor_thread(), surface.Pass(), gpu_service.Pass())); 308 setup_->compositor_thread(), setup_->gpu_memory_buffer_manager(),
309 setup_->raster_thread_helper()->task_graph_runner(), surface.Pass(),
310 gpu_service.Pass()));
309 } 311 }
310 312
311 blink::WebLayerTreeView* HTMLDocument::layerTreeView() { 313 blink::WebLayerTreeView* HTMLDocument::layerTreeView() {
312 return web_layer_tree_view_impl_.get(); 314 return web_layer_tree_view_impl_.get();
313 } 315 }
314 316
315 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( 317 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer(
316 blink::WebLocalFrame* frame, 318 blink::WebLocalFrame* frame,
317 const blink::WebURL& url, 319 const blink::WebURL& url,
318 blink::WebMediaPlayerClient* client, 320 blink::WebMediaPlayerClient* client,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 touch_handler_->OnTouchEvent(*event); 463 touch_handler_->OnTouchEvent(*event);
462 return; 464 return;
463 } 465 }
464 scoped_ptr<blink::WebInputEvent> web_event = 466 scoped_ptr<blink::WebInputEvent> web_event =
465 event.To<scoped_ptr<blink::WebInputEvent>>(); 467 event.To<scoped_ptr<blink::WebInputEvent>>();
466 if (web_event) 468 if (web_event)
467 web_view_->handleInputEvent(*web_event); 469 web_view_->handleInputEvent(*web_event);
468 } 470 }
469 471
470 } // namespace html_viewer 472 } // namespace html_viewer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698