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

Side by Side Diff: chrome/test/data/extensions/platform_apps/web_view/guest_focus_test/guest.js

Issue 2399853003: [M54 merge] Lock down creation of blob:chrome-extension URLs from non-extension processes. (Closed)
Patch Set: Rebase Created 4 years, 2 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 | « chrome/browser/extensions/process_manager_browsertest.cc ('k') | content/browser/bad_message.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 var LOG = function(msg) { 5 var LOG = function(msg) {
6 window.console.log(msg); 6 window.console.log(msg);
7 }; 7 };
8 8
9 var embedder; 9 var embedder;
10 10
11 function sendMessageToEmbedder(message) { 11 function sendMessageToEmbedder(message) {
12 if (!embedder) { 12 if (!embedder) {
13 LOG('no embedder channel to send postMessage'); 13 LOG('no embedder channel to send postMessage');
14 return; 14 return;
15 } 15 }
16 embedder.postMessage(JSON.stringify([message]), '*'); 16 embedder.postMessage(JSON.stringify([message]), '*');
17 } 17 }
18 18
19 window.addEventListener('message', function(e) { 19 window.addEventListener('message', function(e) {
20 URL.createObjectURL(new Blob([]));
20 embedder = e.source; 21 embedder = e.source;
21 var data = JSON.parse(e.data); 22 var data = JSON.parse(e.data);
22 if (data[0] == 'connect') { 23 if (data[0] == 'connect') {
23 sendMessageToEmbedder('connected'); 24 sendMessageToEmbedder('connected');
24 } 25 }
25 }); 26 });
OLDNEW
« no previous file with comments | « chrome/browser/extensions/process_manager_browsertest.cc ('k') | content/browser/bad_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698