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

Side by Side Diff: extensions/renderer/resources/set_icon.js

Issue 1417513003: [Extensions] Don't allow built-in extensions code to be overridden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jochen's Created 5 years, 1 month 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 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 var SetIconCommon = requireNative('setIcon').SetIconCommon; 5 var SetIconCommon = requireNative('setIcon').SetIconCommon;
6 var sendRequest = require('sendRequest').sendRequest; 6 var sendRequest = require('sendRequest').sendRequest;
7 7
8 function loadImagePath(path, iconSize, callback) { 8 function loadImagePath(path, iconSize, callback) {
9 var img = new Image(); 9 var img = new Image();
10 img.onerror = function() { 10 img.onerror = function() {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 delete details.path; 126 delete details.path;
127 callback(SetIconCommon(details)); 127 callback(SetIconCommon(details));
128 return; 128 return;
129 }); 129 });
130 } 130 }
131 return; 131 return;
132 } 132 }
133 throw new Error('Either the path or imageData property must be specified.'); 133 throw new Error('Either the path or imageData property must be specified.');
134 } 134 }
135 135
136 exports.setIcon = setIcon; 136 exports.$set('setIcon', setIcon);
OLDNEW
« no previous file with comments | « extensions/renderer/resources/serial_custom_bindings.js ('k') | extensions/renderer/resources/storage_area.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698