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

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

Issue 1245683004: Mandoline: Merge Surfaces and Views apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Rob's comments Created 5 years, 4 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 void HTMLDocument::initializeLayerTreeView() { 294 void HTMLDocument::initializeLayerTreeView() {
295 if (global_state_->is_headless()) { 295 if (global_state_->is_headless()) {
296 web_layer_tree_view_impl_.reset( 296 web_layer_tree_view_impl_.reset(
297 new WebLayerTreeViewImpl(global_state_->compositor_thread(), nullptr, 297 new WebLayerTreeViewImpl(global_state_->compositor_thread(), nullptr,
298 nullptr, nullptr, nullptr)); 298 nullptr, nullptr, nullptr));
299 return; 299 return;
300 } 300 }
301 301
302 mojo::URLRequestPtr request(mojo::URLRequest::New()); 302 mojo::URLRequestPtr request(mojo::URLRequest::New());
303 request->url = mojo::String::From("mojo:surfaces_service"); 303 request->url = mojo::String::From("mojo:view_manager");
304 mojo::SurfacePtr surface; 304 mojo::SurfacePtr surface;
305 html_document_app_->ConnectToService(request.Pass(), &surface); 305 html_document_app_->ConnectToService(request.Pass(), &surface);
306 306
307 // TODO(jamesr): Should be mojo:gpu_service 307 // TODO(jamesr): Should be mojo:gpu_service
rjkroege 2015/08/06 22:39:11 my presumption is that its existence is to permit
Fady Samuel 2015/08/07 01:15:21 Yes, we can split GL off to a GPU process if we ne
308 mojo::URLRequestPtr request2(mojo::URLRequest::New()); 308 mojo::URLRequestPtr request2(mojo::URLRequest::New());
309 request2->url = mojo::String::From("mojo:view_manager"); 309 request2->url = mojo::String::From("mojo:view_manager");
310 mojo::GpuPtr gpu_service; 310 mojo::GpuPtr gpu_service;
311 html_document_app_->ConnectToService(request2.Pass(), &gpu_service); 311 html_document_app_->ConnectToService(request2.Pass(), &gpu_service);
312 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( 312 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl(
313 global_state_->compositor_thread(), 313 global_state_->compositor_thread(),
314 global_state_->gpu_memory_buffer_manager(), 314 global_state_->gpu_memory_buffer_manager(),
315 global_state_->raster_thread_helper()->task_graph_runner(), 315 global_state_->raster_thread_helper()->task_graph_runner(),
316 surface.Pass(), gpu_service.Pass())); 316 surface.Pass(), gpu_service.Pass()));
317 } 317 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 468
469 void HTMLDocument::UpdateFocus() { 469 void HTMLDocument::UpdateFocus() {
470 if (!web_view_) 470 if (!web_view_)
471 return; 471 return;
472 bool is_focused = root_ && root_->HasFocus(); 472 bool is_focused = root_ && root_->HasFocus();
473 web_view_->setFocus(is_focused); 473 web_view_->setFocus(is_focused);
474 web_view_->setIsActive(is_focused); 474 web_view_->setIsActive(is_focused);
475 } 475 }
476 476
477 } // namespace html_viewer 477 } // namespace html_viewer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698