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

Unified Diff: content/public/browser/android/app_web_message_port_service.h

Issue 2375133002: Move MessagePort implementation from android_webview to content (Closed)
Patch Set: sgurun's comments Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/android/app_web_message_port_service.h
diff --git a/android_webview/browser/aw_message_port_service.h b/content/public/browser/android/app_web_message_port_service.h
similarity index 30%
rename from android_webview/browser/aw_message_port_service.h
rename to content/public/browser/android/app_web_message_port_service.h
index 779d90caabe93efc2135eaedf9cda1b13ae63aab..93104ab0518f48ea53d20364b1606448064bee1a 100644
--- a/android_webview/browser/aw_message_port_service.h
+++ b/content/public/browser/android/app_web_message_port_service.h
@@ -2,33 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ANDROID_WEBVIEW_BROWSER_AW_MESSAGE_PORT_SERVICE_H_
-#define ANDROID_WEBVIEW_BROWSER_AW_MESSAGE_PORT_SERVICE_H_
+#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_
+#define CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_
+#include <jni.h>
#include <vector>
#include "base/values.h"
-namespace android_webview {
-class AwMessagePortMessageFilter;
+namespace content {
+class WebContents;
-// The interface for AwMessagePortService
-class AwMessagePortService {
+// The interface for AppWebMessagePortService
+class AppWebMessagePortService {
public:
- virtual ~AwMessagePortService() { }
+ virtual ~AppWebMessagePortService() { }
- virtual void OnConvertedWebToAppMessage(
- int message_port_id,
- const base::ListValue& message,
- const std::vector<int>& sent_message_port_ids) = 0;
-
- virtual void OnMessagePortMessageFilterClosing(
- AwMessagePortMessageFilter* filter) = 0;
+ virtual void CreateMessageChannel(
+ JNIEnv* env, jobjectArray ports, WebContents* web_contents) = 0;
virtual void CleanupPort(int message_port_id) = 0;
};
-} // namespace android_webview
+} // namespace content
-#endif // ANDROID_WEBVIEW_BROWSER_AW_MESSAGE_PORT_SERVICE_H_
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698