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

Unified Diff: extensions/renderer/dispatcher.cc

Issue 534163002: Move app.window API implementation to extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix OWNERS Created 6 years, 3 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: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index d52d1505c06bfe2a7da38acde2639c831bf5fa29..edd4e40360dc2c85eb5355932486a4fc612fc77b 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -41,6 +41,7 @@
#include "extensions/renderer/api_activity_logger.h"
#include "extensions/renderer/api_definitions_natives.h"
#include "extensions/renderer/app_runtime_custom_bindings.h"
+#include "extensions/renderer/app_window_custom_bindings.h"
#include "extensions/renderer/binding_generating_native_handler.h"
#include "extensions/renderer/blob_native_handler.h"
#include "extensions/renderer/content_watcher.h"
@@ -502,6 +503,8 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() {
resources.push_back(
std::make_pair("app.runtime", IDR_APP_RUNTIME_CUSTOM_BINDINGS_JS));
resources.push_back(
+ std::make_pair("app.window", IDR_APP_WINDOW_CUSTOM_BINDINGS_JS));
+ resources.push_back(
std::make_pair("contextMenus", IDR_CONTEXT_MENUS_CUSTOM_BINDINGS_JS));
resources.push_back(
std::make_pair("extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS));
@@ -510,6 +513,7 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() {
std::make_pair("permissions", IDR_PERMISSIONS_CUSTOM_BINDINGS_JS));
resources.push_back(
std::make_pair("runtime", IDR_RUNTIME_CUSTOM_BINDINGS_JS));
+ resources.push_back(std::make_pair("windowControls", IDR_WINDOW_CONTROLS_JS));
resources.push_back(std::make_pair("binding", IDR_BINDING_JS));
// Custom types sources.
@@ -585,6 +589,10 @@ void Dispatcher::RegisterNativeHandlers(ModuleSystem* module_system,
"app_runtime",
scoped_ptr<NativeHandler>(new AppRuntimeCustomBindings(context)));
module_system->RegisterNativeHandler(
+ "app_window_natives",
+ scoped_ptr<NativeHandler>(
+ new AppWindowCustomBindings(dispatcher, context)));
+ module_system->RegisterNativeHandler(
"blob_natives",
scoped_ptr<NativeHandler>(new BlobNativeHandler(context)));
module_system->RegisterNativeHandler(
« no previous file with comments | « extensions/renderer/app_window_custom_bindings.cc ('k') | extensions/renderer/resources/app_window_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698