| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "components/html_viewer/blink_settings.h" | 8 #include "components/html_viewer/blink_settings.h" |
| 9 #include "components/html_viewer/global_state.h" | 9 #include "components/html_viewer/global_state.h" |
| 10 #include "components/html_viewer/ime_controller.h" | 10 #include "components/html_viewer/ime_controller.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 global_state->raster_thread_helper()->task_graph_runner())); | 30 global_state->raster_thread_helper()->task_graph_runner())); |
| 31 } | 31 } |
| 32 | 32 |
| 33 void InitializeWebLayerTreeView(WebLayerTreeViewImpl* web_layer_tree_view, | 33 void InitializeWebLayerTreeView(WebLayerTreeViewImpl* web_layer_tree_view, |
| 34 mojo::ApplicationImpl* app, | 34 mojo::ApplicationImpl* app, |
| 35 mus::Window* window, | 35 mus::Window* window, |
| 36 blink::WebWidget* widget) { | 36 blink::WebWidget* widget) { |
| 37 DCHECK(window); | 37 DCHECK(window); |
| 38 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 38 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 39 request->url = mojo::String::From("mojo:mus"); | 39 request->url = mojo::String::From("mojo:mus"); |
| 40 mojo::GpuPtr gpu_service; | 40 mus::mojom::GpuPtr gpu_service; |
| 41 app->ConnectToService(request.Pass(), &gpu_service); | 41 app->ConnectToService(request.Pass(), &gpu_service); |
| 42 web_layer_tree_view->Initialize(gpu_service.Pass(), window, widget); | 42 web_layer_tree_view->Initialize(gpu_service.Pass(), window, widget); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void UpdateWebViewSizeFromViewSize(mus::Window* window, | 45 void UpdateWebViewSizeFromViewSize(mus::Window* window, |
| 46 blink::WebWidget* web_widget, | 46 blink::WebWidget* web_widget, |
| 47 WebLayerTreeViewImpl* web_layer_tree_view) { | 47 WebLayerTreeViewImpl* web_layer_tree_view) { |
| 48 const gfx::Size size_in_pixels(window->bounds().width, | 48 const gfx::Size size_in_pixels(window->bounds().width, |
| 49 window->bounds().height); | 49 window->bounds().height); |
| 50 const gfx::Size size_in_dips = gfx::ConvertSizeToDIP( | 50 const gfx::Size size_in_dips = gfx::ConvertSizeToDIP( |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { | 215 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { |
| 216 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); | 216 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void HTMLWidgetLocalRoot::showImeIfNeeded() { | 219 void HTMLWidgetLocalRoot::showImeIfNeeded() { |
| 220 ime_controller_->ShowImeIfNeeded(); | 220 ime_controller_->ShowImeIfNeeded(); |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace html_viewer | 223 } // namespace html_viewer |
| OLD | NEW |