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

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

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_frame.h" 5 #include "components/html_viewer/html_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 585
586 void HTMLFrame::didCancelCompositionOnSelectionChange() { 586 void HTMLFrame::didCancelCompositionOnSelectionChange() {
587 // TODO(penghuang): Update text input state. 587 // TODO(penghuang): Update text input state.
588 } 588 }
589 589
590 void HTMLFrame::didChangeContents() { 590 void HTMLFrame::didChangeContents() {
591 // TODO(penghuang): Update text input state. 591 // TODO(penghuang): Update text input state.
592 } 592 }
593 593
594 void HTMLFrame::initializeLayerTreeView() { 594 void HTMLFrame::initializeLayerTreeView() {
595 mojo::URLRequestPtr request(mojo::URLRequest::New()); 595 DCHECK(view());
596 request->url = mojo::String::From("mojo:view_manager"); 596
597 mojo::SurfacePtr surface; 597 mojo::CompositorFrameReceiverPtr receiver;
598 GetLocalRootApp()->ConnectToService(request.Pass(), &surface); 598 view()->RequestCompositorFrameReceiver(GetProxy(&receiver));
599 599
600 mojo::URLRequestPtr request2(mojo::URLRequest::New()); 600 mojo::URLRequestPtr request2(mojo::URLRequest::New());
601 request2->url = mojo::String::From("mojo:view_manager"); 601 request2->url = mojo::String::From("mojo:view_manager");
602 mojo::GpuPtr gpu_service; 602 mojo::GpuPtr gpu_service;
603 GetLocalRootApp()->ConnectToService(request2.Pass(), &gpu_service); 603 GetLocalRootApp()->ConnectToService(request2.Pass(), &gpu_service);
604 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( 604 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl(
605 global_state()->compositor_thread(), 605 global_state()->compositor_thread(),
606 global_state()->gpu_memory_buffer_manager(), 606 global_state()->gpu_memory_buffer_manager(),
607 global_state()->raster_thread_helper()->task_graph_runner(), 607 global_state()->raster_thread_helper()->task_graph_runner(),
608 surface.Pass(), gpu_service.Pass())); 608 receiver.Pass(), gpu_service.Pass()));
609 } 609 }
610 610
611 blink::WebLayerTreeView* HTMLFrame::layerTreeView() { 611 blink::WebLayerTreeView* HTMLFrame::layerTreeView() {
612 return web_layer_tree_view_impl_.get(); 612 return web_layer_tree_view_impl_.get();
613 } 613 }
614 614
615 void HTMLFrame::resetInputMethod() { 615 void HTMLFrame::resetInputMethod() {
616 // When this method gets called, WebWidgetClient implementation should 616 // When this method gets called, WebWidgetClient implementation should
617 // reset the input method by cancelling any ongoing composition. 617 // reset the input method by cancelling any ongoing composition.
618 // TODO(penghuang): Reset IME. 618 // TODO(penghuang): Reset IME.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 877
878 void HTMLFrame::reload(bool ignore_cache, bool is_client_redirect) { 878 void HTMLFrame::reload(bool ignore_cache, bool is_client_redirect) {
879 NOTIMPLEMENTED(); 879 NOTIMPLEMENTED();
880 } 880 }
881 881
882 void HTMLFrame::forwardInputEvent(const blink::WebInputEvent* event) { 882 void HTMLFrame::forwardInputEvent(const blink::WebInputEvent* event) {
883 NOTIMPLEMENTED(); 883 NOTIMPLEMENTED();
884 } 884 }
885 885
886 } // namespace mojo 886 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698