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

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

Issue 8103003: Revert 103263 - Merge 101221 - Reland 101111 - Only deliver extension messages to contexts that c... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/874/src/
Patch Set: Created 9 years, 2 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_MESSAGE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 public NotificationObserver { 49 public NotificationObserver {
50 public: 50 public:
51 // A messaging channel. Note that the opening port can be the same as the 51 // A messaging channel. Note that the opening port can be the same as the
52 // receiver, if an extension toolstrip wants to talk to its tab (for example). 52 // receiver, if an extension toolstrip wants to talk to its tab (for example).
53 struct MessageChannel; 53 struct MessageChannel;
54 struct MessagePort; 54 struct MessagePort;
55 55
56 // Javascript function name constants. 56 // Javascript function name constants.
57 static const char kDispatchOnConnect[]; 57 static const char kDispatchOnConnect[];
58 static const char kDispatchOnDisconnect[]; 58 static const char kDispatchOnDisconnect[];
59 static const char kDispatchOnMessage[];
59 60
60 // Allocates a pair of port ids. 61 // Allocates a pair of port ids.
61 // NOTE: this can be called from any thread. 62 // NOTE: this can be called from any thread.
62 static void AllocatePortIdPair(int* port1, int* port2); 63 static void AllocatePortIdPair(int* port1, int* port2);
63 64
64 explicit ExtensionMessageService(Profile* profile); 65 explicit ExtensionMessageService(Profile* profile);
65 66
66 // Notification that our owning profile is going away. 67 // Notification that our owning profile is going away.
67 void DestroyingProfile(); 68 void DestroyingProfile();
68 69
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 Profile* profile_; 145 Profile* profile_;
145 146
146 NotificationRegistrar registrar_; 147 NotificationRegistrar registrar_;
147 148
148 MessageChannelMap channels_; 149 MessageChannelMap channels_;
149 150
150 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageService); 151 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageService);
151 }; 152 };
152 153
153 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_SERVICE_H_ 154 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/debugger/extension_ports_remote_service.cc ('k') | chrome/browser/extensions/extension_message_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698