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

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

Issue 197054: Don't send the channel-disconnect message if the recipient is in the process (Closed)
Patch Set: raf's rewording is better Created 11 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_message_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 ResourceMessageFilter* source); 127 ResourceMessageFilter* source);
128 128
129 private: 129 private:
130 // A map of channel ID to its channel object. 130 // A map of channel ID to its channel object.
131 typedef std::map<int, linked_ptr<MessageChannel> > MessageChannelMap; 131 typedef std::map<int, linked_ptr<MessageChannel> > MessageChannelMap;
132 132
133 // Allocates a pair of port ids. 133 // Allocates a pair of port ids.
134 // NOTE: this can be called from any thread. 134 // NOTE: this can be called from any thread.
135 void AllocatePortIdPair(int* port1, int* port2); 135 void AllocatePortIdPair(int* port1, int* port2);
136 136
137 void CloseChannelImpl(MessageChannelMap::iterator channel_iter, int port_id); 137 void CloseChannelImpl(MessageChannelMap::iterator channel_iter, int port_id,
138 bool notify_other_port);
138 139
139 // The UI message loop, used for posting tasks. 140 // The UI message loop, used for posting tasks.
140 MessageLoop* ui_loop_; 141 MessageLoop* ui_loop_;
141 142
142 // --- UI thread only: 143 // --- UI thread only:
143 144
144 // Handles channel creation and notifies the destinations that a channel was 145 // Handles channel creation and notifies the destinations that a channel was
145 // opened. 146 // opened.
146 void OpenChannelToExtensionOnUIThread( 147 void OpenChannelToExtensionOnUIThread(
147 int source_process_id, int source_routing_id, int receiver_port_id, 148 int source_process_id, int source_routing_id, int receiver_port_id,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 int next_port_id_; 186 int next_port_id_;
186 187
187 // Protects the next_port_id_ variable, since it can be 188 // Protects the next_port_id_ variable, since it can be
188 // used on the IO thread or the UI thread. 189 // used on the IO thread or the UI thread.
189 Lock next_port_id_lock_; 190 Lock next_port_id_lock_;
190 191
191 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageService); 192 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageService);
192 }; 193 };
193 194
194 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_SERVICE_H_ 195 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_message_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698