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

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

Issue 1362983004: Mandoline: fix the crash when a remote subframe tries to access session storage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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/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
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
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
OLDNEW
« components/html_viewer/html_widget.h ('K') | « components/html_viewer/html_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698