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_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ | 5 #ifndef CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ |
6 #define CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ | 6 #define CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 ~CastWindowAndroid() override; | 48 ~CastWindowAndroid() override; |
49 | 49 |
50 void LoadURL(const GURL& url); | 50 void LoadURL(const GURL& url); |
51 // Calls RVH::ClosePage() and waits for acknowledgement before closing/ | 51 // Calls RVH::ClosePage() and waits for acknowledgement before closing/ |
52 // deleting the window. | 52 // deleting the window. |
53 void Close(); | 53 void Close(); |
54 // Destroys this window immediately. | 54 // Destroys this window immediately. |
55 void Destroy(); | 55 void Destroy(); |
56 | 56 |
57 // Registers the JNI methods for CastWindowAndroid. | |
58 static bool RegisterJni(JNIEnv* env); | |
59 | |
60 // content::WebContentsDelegate implementation: | 57 // content::WebContentsDelegate implementation: |
61 void AddNewContents(content::WebContents* source, | 58 void AddNewContents(content::WebContents* source, |
62 content::WebContents* new_contents, | 59 content::WebContents* new_contents, |
63 WindowOpenDisposition disposition, | 60 WindowOpenDisposition disposition, |
64 const gfx::Rect& initial_rect, | 61 const gfx::Rect& initial_rect, |
65 bool user_gesture, | 62 bool user_gesture, |
66 bool* was_blocked) override; | 63 bool* was_blocked) override; |
67 void CloseContents(content::WebContents* source) override; | 64 void CloseContents(content::WebContents* source) override; |
68 bool CanOverscrollContent() const override; | 65 bool CanOverscrollContent() const override; |
69 bool AddMessageToConsole(content::WebContents* source, | 66 bool AddMessageToConsole(content::WebContents* source, |
(...skipping 17 matching lines...) Expand all Loading... |
87 | 84 |
88 base::WeakPtrFactory<CastWindowAndroid> weak_factory_; | 85 base::WeakPtrFactory<CastWindowAndroid> weak_factory_; |
89 | 86 |
90 DISALLOW_COPY_AND_ASSIGN(CastWindowAndroid); | 87 DISALLOW_COPY_AND_ASSIGN(CastWindowAndroid); |
91 }; | 88 }; |
92 | 89 |
93 } // namespace shell | 90 } // namespace shell |
94 } // namespace chromecast | 91 } // namespace chromecast |
95 | 92 |
96 #endif // CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ | 93 #endif // CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ |
OLD | NEW |