| 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_widget.h" | 5 #include "components/html_viewer/html_widget.h" |
| 6 | 6 |
| 7 #include "components/html_viewer/global_state.h" | 7 #include "components/html_viewer/global_state.h" |
| 8 #include "components/html_viewer/ime_controller.h" | 8 #include "components/html_viewer/ime_controller.h" |
| 9 #include "components/html_viewer/web_layer_tree_view_impl.h" | 9 #include "components/html_viewer/web_layer_tree_view_impl.h" |
| 10 #include "components/html_viewer/web_storage_namespace_impl.h" | 10 #include "components/html_viewer/web_storage_namespace_impl.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 global_state->gpu_memory_buffer_manager(), | 25 global_state->gpu_memory_buffer_manager(), |
| 26 global_state->raster_thread_helper()->task_graph_runner())); | 26 global_state->raster_thread_helper()->task_graph_runner())); |
| 27 } | 27 } |
| 28 | 28 |
| 29 void InitializeWebLayerTreeView(WebLayerTreeViewImpl* web_layer_tree_view, | 29 void InitializeWebLayerTreeView(WebLayerTreeViewImpl* web_layer_tree_view, |
| 30 mojo::ApplicationImpl* app, | 30 mojo::ApplicationImpl* app, |
| 31 mojo::View* view, | 31 mojo::View* view, |
| 32 blink::WebWidget* widget) { | 32 blink::WebWidget* widget) { |
| 33 DCHECK(view); | 33 DCHECK(view); |
| 34 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 34 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 35 request->url = mojo::String::From("mojo:view_manager"); | 35 request->url = mojo::String::From("mojo:mus"); |
| 36 mojo::GpuPtr gpu_service; | 36 mojo::GpuPtr gpu_service; |
| 37 app->ConnectToService(request.Pass(), &gpu_service); | 37 app->ConnectToService(request.Pass(), &gpu_service); |
| 38 web_layer_tree_view->Initialize(gpu_service.Pass(), view, widget); | 38 web_layer_tree_view->Initialize(gpu_service.Pass(), view, widget); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void UpdateWebViewSizeFromViewSize(mojo::View* view, | 41 void UpdateWebViewSizeFromViewSize(mojo::View* view, |
| 42 blink::WebWidget* web_widget, | 42 blink::WebWidget* web_widget, |
| 43 WebLayerTreeViewImpl* web_layer_tree_view) { | 43 WebLayerTreeViewImpl* web_layer_tree_view) { |
| 44 const gfx::Size size_in_pixels(view->bounds().width, view->bounds().height); | 44 const gfx::Size size_in_pixels(view->bounds().width, view->bounds().height); |
| 45 const gfx::Size size_in_dips = gfx::ConvertSizeToDIP( | 45 const gfx::Size size_in_dips = gfx::ConvertSizeToDIP( |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { | 197 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { |
| 198 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); | 198 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 void HTMLWidgetLocalRoot::showImeIfNeeded() { | 201 void HTMLWidgetLocalRoot::showImeIfNeeded() { |
| 202 ime_controller_->ShowImeIfNeeded(); | 202 ime_controller_->ShowImeIfNeeded(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace html_viewer | 205 } // namespace html_viewer |
| OLD | NEW |