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

Unified Diff: chrome/browser/extensions/extension_process_manager.h

Issue 155514: Implement extension specific events (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/browser/extensions/extension_process_manager.h
===================================================================
--- chrome/browser/extensions/extension_process_manager.h (revision 20629)
+++ chrome/browser/extensions/extension_process_manager.h (working copy)
@@ -5,7 +5,9 @@
#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
+#include <map>
#include <set>
+#include <string>
#include "base/ref_counted.h"
#include "chrome/common/notification_registrar.h"
@@ -43,6 +45,13 @@
// Returns the SiteInstance that the given URL belongs to.
SiteInstance* GetSiteInstanceForURL(const GURL& url);
+ // Register an extension process by |extension_id| and specifying which
+ // |process_id| it belongs to.
+ void RegisterExtensionProcess(std::string extension_id, int process_id);
+
+ // Unregister an extension process with specified |process_id|.
+ void UnregisterExtensionProcess(int process_id);
+
// NotificationObserver:
virtual void Observe(NotificationType type,
const NotificationSource& source,
@@ -69,6 +78,10 @@
// controls process grouping.
scoped_refptr<BrowsingInstance> browsing_instance_;
+ // A map of extension ID to the render_process_id that the extension lives in.
+ typedef std::map<std::string, int> ProcessIDMap;
+ ProcessIDMap process_ids_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager);
};

Powered by Google App Engine
This is Rietveld 408576698