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

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

Issue 1455833005: Convert ConnectToApplication to take a params class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month 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_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 17 matching lines...) Expand all
28 global_state->compositor_thread(), 28 global_state->compositor_thread(),
29 global_state->gpu_memory_buffer_manager(), 29 global_state->gpu_memory_buffer_manager(),
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());
39 request->url = mojo::String::From("mojo:mus");
40 mus::mojom::GpuPtr gpu_service; 38 mus::mojom::GpuPtr gpu_service;
41 app->ConnectToService(request.Pass(), &gpu_service); 39 app->ConnectToService("mojo:mus", &gpu_service);
42 web_layer_tree_view->Initialize(gpu_service.Pass(), window, widget); 40 web_layer_tree_view->Initialize(gpu_service.Pass(), window, widget);
43 } 41 }
44 42
45 void UpdateWebViewSizeFromViewSize(mus::Window* window, 43 void UpdateWebViewSizeFromViewSize(mus::Window* window,
46 blink::WebWidget* web_widget, 44 blink::WebWidget* web_widget,
47 WebLayerTreeViewImpl* web_layer_tree_view) { 45 WebLayerTreeViewImpl* web_layer_tree_view) {
48 const gfx::Size size_in_pixels(window->bounds().size()); 46 const gfx::Size size_in_pixels(window->bounds().size());
49 const gfx::Size size_in_dips = gfx::ConvertSizeToDIP( 47 const gfx::Size size_in_dips = gfx::ConvertSizeToDIP(
50 window->viewport_metrics().device_pixel_ratio, size_in_pixels); 48 window->viewport_metrics().device_pixel_ratio, size_in_pixels);
51 web_widget->resize( 49 web_widget->resize(
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 212
215 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { 213 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() {
216 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); 214 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput();
217 } 215 }
218 216
219 void HTMLWidgetLocalRoot::showImeIfNeeded() { 217 void HTMLWidgetLocalRoot::showImeIfNeeded() {
220 ime_controller_->ShowImeIfNeeded(); 218 ime_controller_->ShowImeIfNeeded();
221 } 219 }
222 220
223 } // namespace html_viewer 221 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/html_document_application_delegate.cc ('k') | components/html_viewer/layout_test_html_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698