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

Side by Side Diff: chrome/browser/extensions/extension_event_router.h

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 11 matching lines...) Expand all
22 22
23 class ExtensionEventRouter : public NotificationObserver { 23 class ExtensionEventRouter : public NotificationObserver {
24 public: 24 public:
25 // Returns true if the given extension can see events and data from another 25 // Returns true if the given extension can see events and data from another
26 // sub-profile (incognito to original profile, or vice versa). 26 // sub-profile (incognito to original profile, or vice versa).
27 static bool CanCrossIncognito(Profile* profile, 27 static bool CanCrossIncognito(Profile* profile,
28 const std::string& extension_id); 28 const std::string& extension_id);
29 static bool CanCrossIncognito(Profile* profile, const Extension* extension); 29 static bool CanCrossIncognito(Profile* profile, const Extension* extension);
30 30
31 explicit ExtensionEventRouter(Profile* profile); 31 explicit ExtensionEventRouter(Profile* profile);
32 ~ExtensionEventRouter(); 32 virtual ~ExtensionEventRouter();
33 33
34 // Add or remove the process/extension pair as a listener for |event_name|. 34 // Add or remove the process/extension pair as a listener for |event_name|.
35 // Note that multiple extensions can share a process due to process 35 // Note that multiple extensions can share a process due to process
36 // collapsing. Also, a single extension can have 2 processes if it is a split 36 // collapsing. Also, a single extension can have 2 processes if it is a split
37 // mode extension. 37 // mode extension.
38 void AddEventListener(const std::string& event_name, 38 void AddEventListener(const std::string& event_name,
39 RenderProcessHost* process, 39 RenderProcessHost* process,
40 const std::string& extension_id); 40 const std::string& extension_id);
41 void RemoveEventListener(const std::string& event_name, 41 void RemoveEventListener(const std::string& event_name,
42 RenderProcessHost* process, 42 RenderProcessHost* process,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 // A map between an event name and a set of extensions that are listening 90 // A map between an event name and a set of extensions that are listening
91 // to that event. 91 // to that event.
92 typedef std::map<std::string, std::set<EventListener> > ListenerMap; 92 typedef std::map<std::string, std::set<EventListener> > ListenerMap;
93 ListenerMap listeners_; 93 ListenerMap listeners_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(ExtensionEventRouter); 95 DISALLOW_COPY_AND_ASSIGN(ExtensionEventRouter);
96 }; 96 };
97 97
98 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_ 98 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_EVENT_ROUTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_debugger_api.h ('k') | chrome/browser/extensions/extension_history_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698