| OLD | NEW |
| 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 | 626 |
| 627 void HTMLFrame::didCancelCompositionOnSelectionChange() { | 627 void HTMLFrame::didCancelCompositionOnSelectionChange() { |
| 628 // TODO(penghuang): Update text input state. | 628 // TODO(penghuang): Update text input state. |
| 629 } | 629 } |
| 630 | 630 |
| 631 void HTMLFrame::didChangeContents() { | 631 void HTMLFrame::didChangeContents() { |
| 632 // TODO(penghuang): Update text input state. | 632 // TODO(penghuang): Update text input state. |
| 633 } | 633 } |
| 634 | 634 |
| 635 void HTMLFrame::initializeLayerTreeView() { | 635 void HTMLFrame::initializeLayerTreeView() { |
| 636 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 636 DCHECK(view()); |
| 637 request->url = mojo::String::From("mojo:view_manager"); | 637 |
| 638 mojo::SurfacePtr surface; | 638 mojo::CompositorFrameReceiverPtr receiver; |
| 639 GetLocalRootApp()->ConnectToService(request.Pass(), &surface); | 639 view()->RequestCompositorFrameReceiver(GetProxy(&receiver)); |
| 640 | 640 |
| 641 mojo::URLRequestPtr request2(mojo::URLRequest::New()); | 641 mojo::URLRequestPtr request2(mojo::URLRequest::New()); |
| 642 request2->url = mojo::String::From("mojo:view_manager"); | 642 request2->url = mojo::String::From("mojo:view_manager"); |
| 643 mojo::GpuPtr gpu_service; | 643 mojo::GpuPtr gpu_service; |
| 644 GetLocalRootApp()->ConnectToService(request2.Pass(), &gpu_service); | 644 GetLocalRootApp()->ConnectToService(request2.Pass(), &gpu_service); |
| 645 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( | 645 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( |
| 646 global_state()->compositor_thread(), | 646 global_state()->compositor_thread(), |
| 647 global_state()->gpu_memory_buffer_manager(), | 647 global_state()->gpu_memory_buffer_manager(), |
| 648 global_state()->raster_thread_helper()->task_graph_runner(), | 648 global_state()->raster_thread_helper()->task_graph_runner(), |
| 649 surface.Pass(), gpu_service.Pass())); | 649 receiver.Pass(), gpu_service.Pass())); |
| 650 } | 650 } |
| 651 | 651 |
| 652 blink::WebLayerTreeView* HTMLFrame::layerTreeView() { | 652 blink::WebLayerTreeView* HTMLFrame::layerTreeView() { |
| 653 return web_layer_tree_view_impl_.get(); | 653 return web_layer_tree_view_impl_.get(); |
| 654 } | 654 } |
| 655 | 655 |
| 656 void HTMLFrame::resetInputMethod() { | 656 void HTMLFrame::resetInputMethod() { |
| 657 // When this method gets called, WebWidgetClient implementation should | 657 // When this method gets called, WebWidgetClient implementation should |
| 658 // reset the input method by cancelling any ongoing composition. | 658 // reset the input method by cancelling any ongoing composition. |
| 659 // TODO(penghuang): Reset IME. | 659 // TODO(penghuang): Reset IME. |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 | 924 |
| 925 void HTMLFrame::reload(bool ignore_cache, bool is_client_redirect) { | 925 void HTMLFrame::reload(bool ignore_cache, bool is_client_redirect) { |
| 926 NOTIMPLEMENTED(); | 926 NOTIMPLEMENTED(); |
| 927 } | 927 } |
| 928 | 928 |
| 929 void HTMLFrame::forwardInputEvent(const blink::WebInputEvent* event) { | 929 void HTMLFrame::forwardInputEvent(const blink::WebInputEvent* event) { |
| 930 NOTIMPLEMENTED(); | 930 NOTIMPLEMENTED(); |
| 931 } | 931 } |
| 932 | 932 |
| 933 } // namespace mojo | 933 } // namespace mojo |
| OLD | NEW |