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

Side by Side Diff: content/public/browser/message_port_delegate.h

Issue 1110103003: Initial implementation of stashed message ports, content side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 14 matching lines...) Expand all
25 // destroyed while there are still message ports associated with them. 25 // destroyed while there are still message ports associated with them.
26 class CONTENT_EXPORT MessagePortDelegate { 26 class CONTENT_EXPORT MessagePortDelegate {
27 public: 27 public:
28 // Sends a message to the given route. Implementations are responsible for 28 // Sends a message to the given route. Implementations are responsible for
29 // updating MessagePortService with new routes for the sent message ports. 29 // updating MessagePortService with new routes for the sent message ports.
30 virtual void SendMessage( 30 virtual void SendMessage(
31 int route_id, 31 int route_id,
32 const MessagePortMessage& message, 32 const MessagePortMessage& message,
33 const std::vector<TransferredMessagePort>& sent_message_ports) = 0; 33 const std::vector<TransferredMessagePort>& sent_message_ports) = 0;
34 34
35 // Called when MessagePortService tried to send a message to a port, but
36 // instead added it to its queue because the port is currently configured to
37 // hold all its messages.
38 virtual void MessageWasHeld(int route_id){};
falken 2015/05/15 06:08:02 should have a space before {}?
Marijn Kruisselbrink 2015/05/18 22:19:36 Ah yes, seems to be a bug in git cl format/clang-f
39
35 // Requests messages to the given route to be queued. 40 // Requests messages to the given route to be queued.
36 virtual void SendMessagesAreQueued(int route_id) = 0; 41 virtual void SendMessagesAreQueued(int route_id) = 0;
37 42
38 protected: 43 protected:
39 virtual ~MessagePortDelegate() {} 44 virtual ~MessagePortDelegate() {}
40 }; 45 };
41 46
42 } // namespace content 47 } // namespace content
43 48
44 #endif // CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_DELEGATE_H_ 49 #endif // CONTENT_PUBLIC_BROWSER_MESSAGE_PORT_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698