OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_MANAGER_H_ | 5 #ifndef CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_MANAGER_H_ |
6 #define CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_MANAGER_H_ | 6 #define CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_MANAGER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
12 | 12 |
13 class CastWindowAndroid; | 13 class CastWindowAndroid; |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class BrowserContext; | 16 class BrowserContext; |
17 } | 17 } |
18 | 18 |
19 namespace chromecast { | 19 namespace chromecast { |
20 namespace shell { | 20 namespace shell { |
21 | 21 |
22 // Sets the browser context to use for creating windows. Must be invoked before | |
23 // a LaunchCastWindow call. | |
24 void SetBrowserContextAndroid(content::BrowserContext* browser_context); | |
25 | |
26 // Given a CastWindowAndroid instance, creates and returns a Java wrapper. | 22 // Given a CastWindowAndroid instance, creates and returns a Java wrapper. |
27 base::android::ScopedJavaLocalRef<jobject> | 23 base::android::ScopedJavaLocalRef<jobject> |
28 CreateCastWindowView(CastWindowAndroid* shell); | 24 CreateCastWindowView(CastWindowAndroid* shell); |
29 | 25 |
30 // Closes a previously created Java wrapper. | 26 // Closes a previously created Java wrapper. |
31 void CloseCastWindowView(jobject shell_wrapper); | 27 void CloseCastWindowView(jobject shell_wrapper); |
32 | 28 |
33 // Registers the CastWindowManager native methods. | 29 // Registers the CastWindowManager native methods. |
34 bool RegisterCastWindowManager(JNIEnv* env); | 30 bool RegisterCastWindowManager(JNIEnv* env); |
35 | 31 |
36 } // namespace shell | 32 } // namespace shell |
37 } // namespace chromecast | 33 } // namespace chromecast |
38 | 34 |
39 #endif // CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_MANAGER_H_ | 35 #endif // CHROMECAST_SHELL_BROWSER_ANDROID_CAST_WINDOW_MANAGER_H_ |
OLD | NEW |