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

Side by Side Diff: mojo/services/html_viewer/html_document.cc

Issue 821023005: Update createChildFrame in mojo's html_viewer to take sandbox flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include WebSandboxFlags.h Created 5 years, 11 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
« no previous file with comments | « mojo/services/html_viewer/html_document.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/services/html_viewer/html_document.h" 5 #include "mojo/services/html_viewer/html_document.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer( 205 blink::WebMediaPlayer* HTMLDocument::createMediaPlayer(
206 blink::WebLocalFrame* frame, 206 blink::WebLocalFrame* frame,
207 const blink::WebURL& url, 207 const blink::WebURL& url,
208 blink::WebMediaPlayerClient* client, 208 blink::WebMediaPlayerClient* client,
209 blink::WebContentDecryptionModule* initial_cdm) { 209 blink::WebContentDecryptionModule* initial_cdm) {
210 return web_media_player_factory_->CreateMediaPlayer(frame, url, client, 210 return web_media_player_factory_->CreateMediaPlayer(frame, url, client,
211 initial_cdm, shell_); 211 initial_cdm, shell_);
212 } 212 }
213 213
214 // TODO(alexmos): Remove once Blink is updated to pass sandboxFlags.
215 blink::WebFrame* HTMLDocument::createChildFrame(
216 blink::WebLocalFrame* parent,
217 const blink::WebString& frameName) {
218 return createChildFrame(parent, frameName, blink::WebSandboxFlags::None);
219 }
220
214 blink::WebFrame* HTMLDocument::createChildFrame( 221 blink::WebFrame* HTMLDocument::createChildFrame(
215 blink::WebLocalFrame* parent, 222 blink::WebLocalFrame* parent,
216 const blink::WebString& frameName) { 223 const blink::WebString& frameName,
224 blink::WebSandboxFlags sandboxFlags) {
217 blink::WebLocalFrame* web_frame = blink::WebLocalFrame::create(this); 225 blink::WebLocalFrame* web_frame = blink::WebLocalFrame::create(this);
218 parent->appendChild(web_frame); 226 parent->appendChild(web_frame);
219 return web_frame; 227 return web_frame;
220 } 228 }
221 229
222 void HTMLDocument::frameDetached(blink::WebFrame* frame) { 230 void HTMLDocument::frameDetached(blink::WebFrame* frame) {
223 if (frame->parent()) 231 if (frame->parent())
224 frame->parent()->removeChild(frame); 232 frame->parent()->removeChild(frame);
225 233
226 // |frame| is invalid after here. 234 // |frame| is invalid after here.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 297 }
290 298
291 void HTMLDocument::OnViewInputEvent(View* view, const mojo::EventPtr& event) { 299 void HTMLDocument::OnViewInputEvent(View* view, const mojo::EventPtr& event) {
292 scoped_ptr<blink::WebInputEvent> web_event = 300 scoped_ptr<blink::WebInputEvent> web_event =
293 event.To<scoped_ptr<blink::WebInputEvent>>(); 301 event.To<scoped_ptr<blink::WebInputEvent>>();
294 if (web_event) 302 if (web_event)
295 web_view_->handleInputEvent(*web_event); 303 web_view_->handleInputEvent(*web_event);
296 } 304 }
297 305
298 } // namespace html_viewer 306 } // namespace html_viewer
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/html_document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698