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

Unified Diff: chrome/renderer/resources/extensions/i18n_custom_bindings.js

Issue 307833002: Move some extensions renderer resources to extensions_renderer_resources.grd. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/i18n_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/i18n_custom_bindings.js b/chrome/renderer/resources/extensions/i18n_custom_bindings.js
deleted file mode 100644
index 5bdd4941bad8572aef31ca6b113b1bb381cb9416..0000000000000000000000000000000000000000
--- a/chrome/renderer/resources/extensions/i18n_custom_bindings.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Custom binding for the i18n API.
-
-var binding = require('binding').Binding.create('i18n');
-
-var i18nNatives = requireNative('i18n');
-var GetL10nMessage = i18nNatives.GetL10nMessage;
-var GetL10nUILanguage = i18nNatives.GetL10nUILanguage;
-
-binding.registerCustomHook(function(bindingsAPI, extensionId) {
- var apiFunctions = bindingsAPI.apiFunctions;
-
- apiFunctions.setUpdateArgumentsPreValidate('getMessage', function() {
- var args = $Array.slice(arguments);
-
- // The first argument is the message, and should be a string.
- var message = args[0];
- if (typeof(message) !== 'string') {
- console.warn(extensionId + ': the first argument to getMessage should ' +
- 'be type "string", was ' + message +
- ' (type "' + typeof(message) + '")');
- args[0] = String(message);
- }
-
- return args;
- });
-
- apiFunctions.setHandleRequest('getMessage',
- function(messageName, substitutions) {
- return GetL10nMessage(messageName, substitutions, extensionId);
- });
-
- apiFunctions.setHandleRequest('getUILanguage', function() {
- return GetL10nUILanguage();
- });
-});
-
-exports.binding = binding.generate();
« no previous file with comments | « chrome/renderer/resources/extensions/greasemonkey_api.js ('k') | chrome/renderer/resources/extensions/image_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698