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

Side by Side Diff: content/browser/message_port_service.h

Issue 831523004: Enable posting a message from JS to Android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix component builds Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_MESSAGE_PORT_SERVICE_H_ 5 #ifndef CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_
6 #define CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_ 6 #define CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "content/common/content_export.h"
15 #include "ipc/ipc_message.h" 16 #include "ipc/ipc_message.h"
16 17
17 namespace content { 18 namespace content {
18 class MessagePortDelegate; 19 class MessagePortDelegate;
19 20
20 class MessagePortService { 21 class CONTENT_EXPORT MessagePortService {
21 public: 22 public:
22 typedef std::vector<std::pair<base::string16, std::vector<int> > > 23 typedef std::vector<std::pair<base::string16, std::vector<int> > >
23 QueuedMessages; 24 QueuedMessages;
24 25
25 // Returns the MessagePortService singleton. 26 // Returns the MessagePortService singleton.
26 static MessagePortService* GetInstance(); 27 static MessagePortService* GetInstance();
27 28
28 // These methods correspond to the message port related IPCs. 29 // These methods correspond to the message port related IPCs.
29 void Create(int route_id, 30 void Create(int route_id,
30 MessagePortDelegate* delegate, 31 MessagePortDelegate* delegate,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 85
85 // We need globally unique identifiers for each message port. 86 // We need globally unique identifiers for each message port.
86 int next_message_port_id_; 87 int next_message_port_id_;
87 88
88 DISALLOW_COPY_AND_ASSIGN(MessagePortService); 89 DISALLOW_COPY_AND_ASSIGN(MessagePortService);
89 }; 90 };
90 91
91 } // namespace content 92 } // namespace content
92 93
93 #endif // CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_ 94 #endif // CONTENT_BROWSER_MESSAGE_PORT_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698