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

Side by Side Diff: content/browser/navigator_connect/navigator_connect_context.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 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_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_CONTEXT_H_ 5 #ifndef CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_CONTEXT_H_
6 #define CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_CONTEXT_H_ 6 #define CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/browser/message_port_delegate.h"
11 #include "content/common/service_worker/service_worker_status_code.h" 10 #include "content/common/service_worker/service_worker_status_code.h"
11 #include "content/public/browser/message_port_delegate.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 struct CrossOriginServiceWorkerClient; 15 struct CrossOriginServiceWorkerClient;
16 class ServiceWorkerContextWrapper; 16 class ServiceWorkerContextWrapper;
17 class ServiceWorkerRegistration; 17 class ServiceWorkerRegistration;
18 18
19 // Tracks all active navigator.connect connections, wakes up service workers 19 // Tracks all active navigator.connect connections, wakes up service workers
20 // when a message arrives, and routes the messages. 20 // when a message arrives, and routes the messages.
21 // One instance of this class exists per StoragePartition. 21 // One instance of this class exists per StoragePartition.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; 57 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
58 struct Connection; 58 struct Connection;
59 // Maps route ids to connections. For the purpose of this class, the route id 59 // Maps route ids to connections. For the purpose of this class, the route id
60 // of a connection is the same as its message_port_id. 60 // of a connection is the same as its message_port_id.
61 std::map<int, Connection> connections_; 61 std::map<int, Connection> connections_;
62 }; 62 };
63 63
64 } // namespace content 64 } // namespace content
65 65
66 #endif // CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_CONTEXT_H_ 66 #endif // CONTENT_BROWSER_NAVIGATOR_CONNECT_NAVIGATOR_CONNECT_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698