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/global_state.h" | 8 #include "components/html_viewer/global_state.h" |
9 #include "components/html_viewer/ime_controller.h" | 9 #include "components/html_viewer/ime_controller.h" |
10 #include "components/html_viewer/stats_collection_controller.h" | 10 #include "components/html_viewer/stats_collection_controller.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 64 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
65 settings->setExperimentalWebGLEnabled( | 65 settings->setExperimentalWebGLEnabled( |
66 !command_line->HasSwitch(kDisableWebGLSwitch)); | 66 !command_line->HasSwitch(kDisableWebGLSwitch)); |
67 } | 67 } |
68 | 68 |
69 } // namespace | 69 } // namespace |
70 | 70 |
71 // HTMLWidgetRootRemote ------------------------------------------------------- | 71 // HTMLWidgetRootRemote ------------------------------------------------------- |
72 | 72 |
73 HTMLWidgetRootRemote::HTMLWidgetRootRemote() | 73 HTMLWidgetRootRemote::HTMLWidgetRootRemote() |
74 : web_view_(blink::WebView::create(nullptr)) { | 74 : web_view_(blink::WebView::create(this)) { |
75 ConfigureSettings(web_view_->settings()); | 75 ConfigureSettings(web_view_->settings()); |
76 } | 76 } |
77 | 77 |
78 HTMLWidgetRootRemote::~HTMLWidgetRootRemote() {} | 78 HTMLWidgetRootRemote::~HTMLWidgetRootRemote() {} |
79 | 79 |
| 80 blink::WebStorageNamespace* |
| 81 HTMLWidgetRootRemote::createSessionStorageNamespace() { |
| 82 return new WebStorageNamespaceImpl(); |
| 83 } |
| 84 |
| 85 bool HTMLWidgetRootRemote::allowsBrokenNullLayerTreeView() const { |
| 86 return true; |
| 87 } |
| 88 |
80 blink::WebWidget* HTMLWidgetRootRemote::GetWidget() { | 89 blink::WebWidget* HTMLWidgetRootRemote::GetWidget() { |
81 return web_view_; | 90 return web_view_; |
82 } | 91 } |
83 | 92 |
84 void HTMLWidgetRootRemote::OnViewBoundsChanged(mus::View* view) {} | 93 void HTMLWidgetRootRemote::OnViewBoundsChanged(mus::View* view) {} |
85 | 94 |
86 // HTMLWidgetRootLocal -------------------------------------------------------- | 95 // HTMLWidgetRootLocal -------------------------------------------------------- |
87 | 96 |
88 HTMLWidgetRootLocal::CreateParams::CreateParams(mojo::ApplicationImpl* app, | 97 HTMLWidgetRootLocal::CreateParams::CreateParams(mojo::ApplicationImpl* app, |
89 GlobalState* global_state, | 98 GlobalState* global_state, |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 226 |
218 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { | 227 void HTMLWidgetLocalRoot::didUpdateTextOfFocusedElementByNonUserInput() { |
219 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); | 228 ime_controller_->DidUpdateTextOfFocusedElementByNonUserInput(); |
220 } | 229 } |
221 | 230 |
222 void HTMLWidgetLocalRoot::showImeIfNeeded() { | 231 void HTMLWidgetLocalRoot::showImeIfNeeded() { |
223 ime_controller_->ShowImeIfNeeded(); | 232 ime_controller_->ShowImeIfNeeded(); |
224 } | 233 } |
225 | 234 |
226 } // namespace html_viewer | 235 } // namespace html_viewer |
OLD | NEW |