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

Unified Diff: chrome/renderer/extensions/extension_dispatcher.h

Issue 9460002: Convert app_bindings.js to the schema_generated_bindings.js infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix koz bool thing Created 8 years, 10 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/extensions/extension_dispatcher.h
diff --git a/chrome/renderer/extensions/extension_dispatcher.h b/chrome/renderer/extensions/extension_dispatcher.h
index c64cd733719c263f604e327da49370b48beabc95..998342dbab59e9fc2fc35b6b0d64acbe03950453 100644
--- a/chrome/renderer/extensions/extension_dispatcher.h
+++ b/chrome/renderer/extensions/extension_dispatcher.h
@@ -14,6 +14,8 @@
#include "base/timer.h"
#include "content/public/renderer/render_process_observer.h"
#include "chrome/common/extensions/extension_set.h"
+#include "chrome/common/extensions/feature.h"
+#include "chrome/renderer/extensions/chrome_v8_context.h"
#include "chrome/renderer/extensions/chrome_v8_context_set.h"
#include "chrome/renderer/resource_bundle_source_map.h"
#include "v8/include/v8.h"
@@ -54,13 +56,11 @@ class ExtensionDispatcher : public content::RenderProcessObserver {
}
UserScriptSlave* user_script_slave() { return user_script_slave_.get(); }
- bool IsApplicationActive(const std::string& extension_id) const;
bool IsExtensionActive(const std::string& extension_id) const;
- // Whether or not we should set up custom bindings for this api.
- bool AllowCustomAPI(WebKit::WebFrame* frame,
- const std::string& custom_binding_api_name,
- int world_id);
+ // Finds the extension ID for the current context. This is determined from
Aaron Boodman 2012/03/06 01:17:21 s/current/specified/ Also, comment should say wha
not at google - send to devlin 2012/03/06 03:53:00 Done.
+ // |world_id| if it's non-zero, or the URL in |frame| if it is.
+ std::string GetExtensionID(WebKit::WebFrame* frame, int world_id);
// See WebKit::WebPermissionClient::allowScriptExtension
// TODO(koz): Remove once WebKit no longer calls this.
@@ -117,7 +117,6 @@ class ExtensionDispatcher : public content::RenderProcessObserver {
const Extension::ScriptingWhitelist& extension_ids);
void OnPageActionsUpdated(const std::string& extension_id,
const std::vector<std::string>& page_actions);
- void OnActivateApplication(const std::string& extension_id);
void OnActivateExtension(const std::string& extension_id);
void OnUpdatePermissions(int reason_id,
const std::string& extension_id,
@@ -145,15 +144,17 @@ class ExtensionDispatcher : public content::RenderProcessObserver {
const URLPatternSet& origins);
void RegisterNativeHandlers(ModuleSystem* module_system,
- ChromeV8Context* context,
- bool is_bindings_allowed);
+ ChromeV8Context* context);
// Inserts static source code into |source_map_|.
void PopulateSourceMap();
- // Finds the extension ID for the current context. This is determined from
- // |world_id| if it's non-zero, or the URL in |frame| if it is.
- std::string GetExtensionID(WebKit::WebFrame* frame, int world_id);
+ // Returns the type of context that should be created, given an extension ID
Aaron Boodman 2012/03/06 01:17:21 Returns the Feature::Context type for a JavaScript
not at google - send to devlin 2012/03/06 03:53:00 Done.
+ // (if any), extension group (if any), and URL info (if any).
+ extensions::Feature::Context ClassifyJavaScriptContext(
+ const std::string& extension_id,
+ int extension_group,
+ const ExtensionURLInfo& url_info);
// True if this renderer is running extensions.
bool is_extension_process_;
@@ -179,12 +180,9 @@ class ExtensionDispatcher : public content::RenderProcessObserver {
// All declared function names.
std::set<std::string> function_names_;
- // The extensions that are active in this process.
+ // The extensions and apps that are active in this process.
std::set<std::string> active_extension_ids_;
- // The applications that are active in this process.
- std::set<std::string> active_application_ids_;
-
// True once WebKit has been initialized (and it is therefore safe to poke).
bool is_webkit_initialized_;

Powered by Google App Engine
This is Rietveld 408576698