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

Side by Side Diff: chrome/browser/extensions/api/messaging/message_service.h

Issue 11745015: Update references to the extension messaging APIs to point to the "runtime" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_API_MESSAGING_MESSAGE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_MESSAGE_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_MESSAGE_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_MESSAGE_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 16 matching lines...) Expand all
27 class ExtensionHost; 27 class ExtensionHost;
28 class LazyBackgroundTaskQueue; 28 class LazyBackgroundTaskQueue;
29 29
30 // This class manages message and event passing between renderer processes. 30 // This class manages message and event passing between renderer processes.
31 // It maintains a list of processes that are listening to events and a set of 31 // It maintains a list of processes that are listening to events and a set of
32 // open channels. 32 // open channels.
33 // 33 //
34 // Messaging works this way: 34 // Messaging works this way:
35 // - An extension-owned script context (like a background page or a content 35 // - An extension-owned script context (like a background page or a content
36 // script) adds an event listener to the "onConnect" event. 36 // script) adds an event listener to the "onConnect" event.
37 // - Another context calls "extension.connect()" to open a channel to the 37 // - Another context calls "runtime.connect()" to open a channel to the
38 // extension process, or an extension context calls "tabs.connect(tabId)" to 38 // extension process, or an extension context calls "tabs.connect(tabId)" to
39 // open a channel to the content scripts for the given tab. The EMS notifies 39 // open a channel to the content scripts for the given tab. The EMS notifies
40 // the target process/tab, which then calls the onConnect event in every 40 // the target process/tab, which then calls the onConnect event in every
41 // context owned by the connecting extension in that process/tab. 41 // context owned by the connecting extension in that process/tab.
42 // - Once the channel is established, either side can call postMessage to send 42 // - Once the channel is established, either side can call postMessage to send
43 // a message to the opposite side of the channel, which may have multiple 43 // a message to the opposite side of the channel, which may have multiple
44 // listeners. 44 // listeners.
45 // 45 //
46 // Terminology: 46 // Terminology:
47 // channel: connection between two ports 47 // channel: connection between two ports
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 LazyBackgroundTaskQueue* lazy_background_task_queue_; 207 LazyBackgroundTaskQueue* lazy_background_task_queue_;
208 208
209 base::WeakPtrFactory<MessageService> weak_factory_; 209 base::WeakPtrFactory<MessageService> weak_factory_;
210 210
211 DISALLOW_COPY_AND_ASSIGN(MessageService); 211 DISALLOW_COPY_AND_ASSIGN(MessageService);
212 }; 212 };
213 213
214 } // namespace extensions 214 } // namespace extensions
215 215
216 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_MESSAGE_SERVICE_H_ 216 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_MESSAGE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/downloads/downloads_api.h ('k') | chrome/browser/extensions/api/messaging/message_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698