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

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: Created 4 years, 3 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/content/public/browser/android/app_web_message_port_service.h b/content/public/browser/android/app_web_message_port_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..d8dbe59e56185632c7a8def53d597b1640705ac2
--- /dev/null
+++ b/content/public/browser/android/app_web_message_port_service.h
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#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 content {
+class WebContents;
+
+// The interface for AppWebMessagePortService
+class AppWebMessagePortService {
+ public:
+ virtual ~AppWebMessagePortService() { }
+
+ virtual void CreateMessageChannel(
+ JNIEnv* env, jobjectArray ports, WebContents* web_contents) = 0;
+ virtual void OnConvertedWebToAppMessage(
sgurun-gerrit only 2016/09/30 23:40:59 no need to be in public interface?
Yusuf 2016/10/04 21:33:14 Done.
+ int message_port_id,
+ const base::ListValue& message,
+ const std::vector<int>& sent_message_port_ids) = 0;
+
+ virtual void CleanupPort(int message_port_id) = 0;
sgurun-gerrit only 2016/09/30 23:40:59 I don't think you need this in public interface an
Yusuf 2016/10/04 21:33:14 Done.
+
+ virtual void RemoveSentPorts(const std::vector<int>& sent_ports) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698