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

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: Fixed bot issues (I hope) 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
« no previous file with comments | « components/gpu/public/interfaces/BUILD.gn ('k') | components/html_viewer/html_frame.cc » ('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 "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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 void HTMLDocument::initializeLayerTreeView() { 298 void HTMLDocument::initializeLayerTreeView() {
299 if (global_state_->is_headless()) { 299 if (global_state_->is_headless()) {
300 web_layer_tree_view_impl_.reset( 300 web_layer_tree_view_impl_.reset(
301 new WebLayerTreeViewImpl(global_state_->compositor_thread(), nullptr, 301 new WebLayerTreeViewImpl(global_state_->compositor_thread(), nullptr,
302 nullptr, nullptr, nullptr)); 302 nullptr, nullptr, nullptr));
303 return; 303 return;
304 } 304 }
305 305
306 mojo::URLRequestPtr request(mojo::URLRequest::New()); 306 mojo::URLRequestPtr request(mojo::URLRequest::New());
307 request->url = mojo::String::From("mojo:surfaces_service"); 307 request->url = mojo::String::From("mojo:view_manager");
308 mojo::SurfacePtr surface; 308 mojo::SurfacePtr surface;
309 html_document_app_->ConnectToService(request.Pass(), &surface); 309 html_document_app_->ConnectToService(request.Pass(), &surface);
310 310
311 // TODO(jamesr): Should be mojo:gpu_service 311 // TODO(jamesr): Should be mojo:gpu_service
312 mojo::URLRequestPtr request2(mojo::URLRequest::New()); 312 mojo::URLRequestPtr request2(mojo::URLRequest::New());
313 request2->url = mojo::String::From("mojo:view_manager"); 313 request2->url = mojo::String::From("mojo:view_manager");
314 mojo::GpuPtr gpu_service; 314 mojo::GpuPtr gpu_service;
315 html_document_app_->ConnectToService(request2.Pass(), &gpu_service); 315 html_document_app_->ConnectToService(request2.Pass(), &gpu_service);
316 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( 316 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl(
317 global_state_->compositor_thread(), 317 global_state_->compositor_thread(),
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 490
491 void HTMLDocument::UpdateFocus() { 491 void HTMLDocument::UpdateFocus() {
492 if (!web_view_) 492 if (!web_view_)
493 return; 493 return;
494 bool is_focused = root_ && root_->HasFocus(); 494 bool is_focused = root_ && root_->HasFocus();
495 web_view_->setFocus(is_focused); 495 web_view_->setFocus(is_focused);
496 web_view_->setIsActive(is_focused); 496 web_view_->setIsActive(is_focused);
497 } 497 }
498 498
499 } // namespace html_viewer 499 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/gpu/public/interfaces/BUILD.gn ('k') | components/html_viewer/html_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698