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

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

Issue 302463005: Add support for AMD to the extensions module system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 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 GetAvailability = requireNative('v8_context').GetAvailability; 5 var GetAvailability = requireNative('v8_context').GetAvailability;
6 var GetGlobal = requireNative('sendRequest').GetGlobal; 6 var GetGlobal = requireNative('send_request_natives').GetGlobal;
7 7
8 // Utility for setting chrome.*.lastError. 8 // Utility for setting chrome.*.lastError.
9 // 9 //
10 // A utility here is useful for two reasons: 10 // A utility here is useful for two reasons:
11 // 1. For backwards compatibility we need to set chrome.extension.lastError, 11 // 1. For backwards compatibility we need to set chrome.extension.lastError,
12 // but not all contexts actually have access to the extension namespace. 12 // but not all contexts actually have access to the extension namespace.
13 // 2. When calling across contexts, the global object that gets lastError set 13 // 2. When calling across contexts, the global object that gets lastError set
14 // needs to be that of the caller. We force callers to explicitly specify 14 // needs to be that of the caller. We force callers to explicitly specify
15 // the chrome object to try to prevent bugs here. 15 // the chrome object to try to prevent bugs here.
16 16
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } finally { 115 } finally {
116 clear(targetChrome); 116 clear(targetChrome);
117 } 117 }
118 } 118 }
119 119
120 exports.clear = clear; 120 exports.clear = clear;
121 exports.hasAccessed = hasAccessed; 121 exports.hasAccessed = hasAccessed;
122 exports.hasError = hasError; 122 exports.hasError = hasError;
123 exports.set = set; 123 exports.set = set;
124 exports.run = run; 124 exports.run = run;
OLDNEW
« no previous file with comments | « extensions/renderer/resources/i18n_custom_bindings.js ('k') | extensions/renderer/resources/runtime_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698