| OLD | NEW |
| 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/values.h" | 12 #include "base/values.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 class WebContents; | 15 class WebContents; |
| 15 | 16 |
| 16 // The interface for AppWebMessagePortService | 17 // The interface for AppWebMessagePortService |
| 17 class AppWebMessagePortService { | 18 class AppWebMessagePortService { |
| 18 public: | 19 public: |
| 19 virtual ~AppWebMessagePortService() {} | 20 virtual ~AppWebMessagePortService() {} |
| 20 | 21 |
| 21 virtual void CreateMessageChannel(JNIEnv* env, | 22 virtual void CreateMessageChannel( |
| 22 jobjectArray ports, | 23 JNIEnv* env, |
| 23 WebContents* web_contents) = 0; | 24 const base::android::JavaRef<jobjectArray>& ports, |
| 25 WebContents* web_contents) = 0; |
| 24 | 26 |
| 25 virtual void CleanupPort(int message_port_id) = 0; | 27 virtual void CleanupPort(int message_port_id) = 0; |
| 26 }; | 28 }; |
| 27 | 29 |
| 28 } // namespace content | 30 } // namespace content |
| 29 | 31 |
| 30 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_ | 32 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_APP_WEB_MESSAGE_PORT_SERVICE_H_ |
| OLD | NEW |