summaryrefslogtreecommitdiffstats
path: root/extensions/renderer/resources
diff options
context:
space:
mode:
authorkalman <kalman@chromium.org>2015-08-21 12:30:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-21 19:31:00 +0000
commit12033f1290753504a3c324293689313b890e4ef2 (patch)
tree84493e36fd5ef8f215bcde3cd82aa638dac52d06 /extensions/renderer/resources
parentb3ad146d98e8e67187e4f072676afbe210e73042 (diff)
downloadchromium_src-12033f1290753504a3c324293689313b890e4ef2.zip
chromium_src-12033f1290753504a3c324293689313b890e4ef2.tar.gz
chromium_src-12033f1290753504a3c324293689313b890e4ef2.tar.bz2
Implement the wake-event-page internal extension API.
This is implemented purely using IPC because it will be used from worker contexts, which don't have access to extension bindings. The next step will be to add worker thread support so the renderer side is structured to easily accommodate for that, once the public content API is chaned to allow it. It will be used in the public chrome.runtime.getBackgroundClient() exposed to service workers. BUG=501569 R=rdevlin.cronin@chromium.org, palmer@chromium.org Review URL: https://codereview.chromium.org/1294993004 Cr-Commit-Position: refs/heads/master@{#344834}
Diffstat (limited to 'extensions/renderer/resources')
-rw-r--r--extensions/renderer/resources/test_custom_bindings.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/extensions/renderer/resources/test_custom_bindings.js b/extensions/renderer/resources/test_custom_bindings.js
index ebb3f1b..7310f06 100644
--- a/extensions/renderer/resources/test_custom_bindings.js
+++ b/extensions/renderer/resources/test_custom_bindings.js
@@ -11,6 +11,7 @@ var environmentSpecificBindings = require('test_environment_specific_bindings');
var GetExtensionAPIDefinitionsForTest =
requireNative('apiDefinitions').GetExtensionAPIDefinitionsForTest;
var GetAPIFeatures = requireNative('test_features').GetAPIFeatures;
+var natives = requireNative('test_native_handler');
var uncaughtExceptionHandler = require('uncaught_exception_handler');
var userGestures = requireNative('user_gestures');
@@ -353,6 +354,10 @@ binding.registerCustomHook(function(api) {
uncaughtExceptionHandler.setHandler(callback);
});
+ apiFunctions.setHandleRequest('getWakeEventPage', function() {
+ return natives.GetWakeEventPage();
+ });
+
environmentSpecificBindings.registerHooks(api);
});