| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 blink::WebSize(size_in_dips.width(), size_in_dips.height())); | 48 blink::WebSize(size_in_dips.width(), size_in_dips.height())); |
| 49 web_layer_tree_view->setViewportSize(size_in_pixels); | 49 web_layer_tree_view->setViewportSize(size_in_pixels); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void ConfigureSettings(blink::WebSettings* settings) { | 52 void ConfigureSettings(blink::WebSettings* settings) { |
| 53 settings->setCookieEnabled(true); | 53 settings->setCookieEnabled(true); |
| 54 settings->setDefaultFixedFontSize(13); | 54 settings->setDefaultFixedFontSize(13); |
| 55 settings->setDefaultFontSize(16); | 55 settings->setDefaultFontSize(16); |
| 56 settings->setLoadsImagesAutomatically(true); | 56 settings->setLoadsImagesAutomatically(true); |
| 57 settings->setJavaScriptEnabled(true); | 57 settings->setJavaScriptEnabled(true); |
| 58 settings->setExperimentalWebGLEnabled(true); |
| 58 } | 59 } |
| 59 | 60 |
| 60 } // namespace | 61 } // namespace |
| 61 | 62 |
| 62 // HTMLWidgetRootRemote ------------------------------------------------------- | 63 // HTMLWidgetRootRemote ------------------------------------------------------- |
| 63 | 64 |
| 64 HTMLWidgetRootRemote::HTMLWidgetRootRemote() | 65 HTMLWidgetRootRemote::HTMLWidgetRootRemote() |
| 65 : web_view_(blink::WebView::create(nullptr)) { | 66 : web_view_(blink::WebView::create(nullptr)) { |
| 66 ConfigureSettings(web_view_->settings()); | 67 ConfigureSettings(web_view_->settings()); |
| 67 } | 68 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 197 |
| 197 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { | 198 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { |
| 198 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); | 199 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); |
| 199 } | 200 } |
| 200 | 201 |
| 201 void HTMLWidgetLocalRoot::showImeIfNeeded() { | 202 void HTMLWidgetLocalRoot::showImeIfNeeded() { |
| 202 ime_controller_->ShowImeIfNeeded(); | 203 ime_controller_->ShowImeIfNeeded(); |
| 203 } | 204 } |
| 204 | 205 |
| 205 } // namespace html_viewer | 206 } // namespace html_viewer |
| OLD | NEW |