| Index: chrome/browser/renderer_host/chrome_extension_message_filter.h
|
| diff --git a/chrome/browser/renderer_host/chrome_extension_message_filter.h b/chrome/browser/renderer_host/chrome_extension_message_filter.h
|
| index 57cd9270d4c147eb52b74c88235a883f8c130037..4a3f341bceda0210b5b83a1bc9f75b2041768282 100644
|
| --- a/chrome/browser/renderer_host/chrome_extension_message_filter.h
|
| +++ b/chrome/browser/renderer_host/chrome_extension_message_filter.h
|
| @@ -9,6 +9,8 @@
|
|
|
| #include "base/sequenced_task_runner_helpers.h"
|
| #include "content/public/browser/browser_message_filter.h"
|
| +#include "content/public/browser/notification_observer.h"
|
| +#include "content/public/browser/notification_registrar.h"
|
|
|
| class GURL;
|
| class Profile;
|
| @@ -26,7 +28,8 @@ class InfoMap;
|
|
|
| // This class filters out incoming Chrome-specific IPC messages from the
|
| // extension process on the IPC thread.
|
| -class ChromeExtensionMessageFilter : public content::BrowserMessageFilter {
|
| +class ChromeExtensionMessageFilter : public content::BrowserMessageFilter,
|
| + public content::NotificationObserver {
|
| public:
|
| ChromeExtensionMessageFilter(int render_process_id, Profile* profile);
|
|
|
| @@ -35,6 +38,7 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter {
|
| virtual void OverrideThreadForMessage(
|
| const IPC::Message& message,
|
| content::BrowserThread::ID* thread) OVERRIDE;
|
| + virtual void OnDestruct() const OVERRIDE;
|
|
|
| private:
|
| friend class content::BrowserThread;
|
| @@ -97,14 +101,23 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter {
|
| const std::string& extension_id,
|
| const ExtensionHostMsg_APIActionOrEvent_Params& params);
|
|
|
| + // content::NotificationObserver implementation.
|
| + virtual void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) OVERRIDE;
|
| +
|
| const int render_process_id_;
|
|
|
| // The Profile associated with our renderer process. This should only be
|
| - // accessed on the UI thread!
|
| + // accessed on the UI thread! Furthermore since this class is refcounted it
|
| + // may outlive |profile_|, so make sure to NULL check if in doubt; async
|
| + // calls and the like.
|
| Profile* profile_;
|
|
|
| scoped_refptr<extensions::InfoMap> extension_info_map_;
|
|
|
| + content::NotificationRegistrar notification_registrar_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ChromeExtensionMessageFilter);
|
| };
|
|
|
|
|