Chromium Code Reviews| 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_ |