Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_MESSAGE_PORT_DELEGATE_H_ | |
| 6 #define CONTENT_BROWSER_MESSAGE_PORT_DELEGATE_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 #include "base/strings/string16.h" | |
|
Avi (use Gerrit)
2014/12/19 21:58:14
space before this line
Marijn Kruisselbrink
2014/12/19 22:13:07
Done.
| |
| 10 | |
| 11 namespace content { | |
| 12 | |
| 13 // Delegate used by MessagePortService to send messages to message ports to the | |
| 14 // correct renderer. Delegates are responsible for managing their own lifetime, | |
| 15 // and should call MessagePortService::OnMessagePortDelegateClosing if they are | |
| 16 // destroyed while there are still message ports associated with them. | |
| 17 class MessagePortDelegate { | |
| 18 public: | |
| 19 // Sends a message to the given route. Implementations are responsible for | |
| 20 // updating MessagePortService with new routes for the sent message ports. | |
| 21 virtual void SendMessage(int route_id, | |
| 22 const base::string16& message, | |
| 23 const std::vector<int>& sent_message_port_ids) = 0; | |
|
Avi (use Gerrit)
2014/12/19 21:58:14
set?
Marijn Kruisselbrink
2014/12/19 22:13:07
I'm pretty sure this actually has to be an ordered
| |
| 24 | |
| 25 // Sends a "messages are queued" IPC to the given route. | |
| 26 virtual void SendMessagesAreQueued(int route_id) = 0; | |
| 27 | |
| 28 protected: | |
| 29 virtual ~MessagePortDelegate() {} | |
| 30 }; | |
| 31 | |
| 32 } // namespace content | |
| 33 | |
| 34 #endif // CONTENT_BROWSER_MESSAGE_PORT_DELEGATE_H_ | |
| OLD | NEW |