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

Side by Side Diff: content/public/browser/android/app_web_message_port_service.h

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Rebase Created 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "content/common/content_export.h"
13 14
14 namespace content { 15 namespace content {
16 class MessagePort;
15 class WebContents; 17 class WebContents;
16 18
17 // The interface for AppWebMessagePortService 19 // The interface for AppWebMessagePortService
18 class AppWebMessagePortService { 20 class CONTENT_EXPORT AppWebMessagePortService {
sgurun-gerrit only 2017/01/27 01:16:38 please drop this class and move UnwrapJavaArray an
19 public: 21 public:
20 virtual ~AppWebMessagePortService() {} 22 virtual ~AppWebMessagePortService() {}
21 23
22 virtual void CreateMessageChannel( 24 virtual void CreateMessageChannel(
23 JNIEnv* env, 25 JNIEnv* env,
24 const base::android::JavaRef<jobjectArray>& ports, 26 const base::android::JavaRef<jobjectArray>& ports,
25 WebContents* web_contents) = 0; 27 WebContents* web_contents) = 0;
26 28
27 virtual void CleanupPort(int message_port_id) = 0; 29 static std::vector<MessagePort> UnwrapJavaArray(
30 JNIEnv* env,
31 const base::android::JavaRef<jobjectArray>& ports);
28 }; 32 };
29 33
30 } // namespace content 34 } // namespace content
31 35
32 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_ 36 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698