OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/android/jni_helper.h" | 10 #include "base/android/jni_helper.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/process.h" | 15 #include "base/process.h" |
16 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 16 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
17 #include "content/browser/web_contents/web_contents_impl.h" | 17 #include "content/browser/web_contents/web_contents_impl.h" |
18 #include "content/public/browser/android/content_view_core.h" | 18 #include "content/public/browser/android/content_view_core.h" |
19 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
21 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
23 #include "ui/gfx/rect.h" | 23 #include "ui/gfx/rect.h" |
24 #include "ui/gfx/rect_f.h" | |
24 | 25 |
25 struct WebMenuItem; | 26 struct WebMenuItem; |
26 | 27 |
27 namespace ui { | 28 namespace ui { |
28 class WindowAndroid; | 29 class WindowAndroid; |
29 } | 30 } |
30 | 31 |
31 namespace content { | 32 namespace content { |
32 class RenderWidgetHostViewAndroid; | 33 class RenderWidgetHostViewAndroid; |
33 class SyncInputEventFilter; | 34 class SyncInputEventFilter; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
208 void ShowImeIfNeeded(JNIEnv* env, jobject obj); | 209 void ShowImeIfNeeded(JNIEnv* env, jobject obj); |
209 | 210 |
210 void ShowInterstitialPage(JNIEnv* env, | 211 void ShowInterstitialPage(JNIEnv* env, |
211 jobject obj, | 212 jobject obj, |
212 jstring jurl, | 213 jstring jurl, |
213 jint delegate); | 214 jint delegate); |
214 jboolean IsShowingInterstitialPage(JNIEnv* env, jobject obj); | 215 jboolean IsShowingInterstitialPage(JNIEnv* env, jobject obj); |
215 | 216 |
216 jboolean ConsumePendingRendererFrame(JNIEnv* env, jobject obj); | 217 jboolean ConsumePendingRendererFrame(JNIEnv* env, jobject obj); |
217 | 218 |
218 void AttachExternalVideoSurface(JNIEnv* env, | 219 void AttachExternalVideoSurface(JNIEnv* env, |
scherkus (not reviewing)
2013/04/17 18:12:41
should these be #ifdef'd ?
wonsik
2013/04/18 05:13:21
Guarding it causes build failure for non-GoogleTV
| |
219 jobject obj, | 220 jobject obj, |
220 jint player_id, | 221 jint player_id, |
221 jobject jsurface); | 222 jobject jsurface); |
222 void DetachExternalVideoSurface(JNIEnv* env, jobject obj, jint player_id); | 223 void DetachExternalVideoSurface(JNIEnv* env, jobject obj, jint player_id); |
223 | 224 |
224 // -------------------------------------------------------------------------- | 225 // -------------------------------------------------------------------------- |
225 // Public methods that call to Java via JNI | 226 // Public methods that call to Java via JNI |
226 // -------------------------------------------------------------------------- | 227 // -------------------------------------------------------------------------- |
227 | 228 |
228 // Creates a popup menu with |items|. | 229 // Creates a popup menu with |items|. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
263 | 264 |
264 void StartContentIntent(const GURL& content_url); | 265 void StartContentIntent(const GURL& content_url); |
265 | 266 |
266 // Shows the disambiguation popup | 267 // Shows the disambiguation popup |
267 // |target_rect| --> window coordinates which |zoomed_bitmap| represents | 268 // |target_rect| --> window coordinates which |zoomed_bitmap| represents |
268 // |zoomed_bitmap| --> magnified image of potential touch targets | 269 // |zoomed_bitmap| --> magnified image of potential touch targets |
269 void ShowDisambiguationPopup( | 270 void ShowDisambiguationPopup( |
270 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap); | 271 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap); |
271 | 272 |
272 void RequestExternalVideoSurface(int player_id); | 273 void RequestExternalVideoSurface(int player_id); |
274 void NotifyGeometryChange(int player_id, const gfx::RectF& rect); | |
273 | 275 |
274 // -------------------------------------------------------------------------- | 276 // -------------------------------------------------------------------------- |
275 // Methods called from native code | 277 // Methods called from native code |
276 // -------------------------------------------------------------------------- | 278 // -------------------------------------------------------------------------- |
277 | 279 |
278 gfx::Size GetPhysicalBackingSize() const; | 280 gfx::Size GetPhysicalBackingSize() const; |
279 gfx::Size GetViewportSizeDip() const; | 281 gfx::Size GetViewportSizeDip() const; |
280 gfx::Size GetViewportSizeOffsetDip() const; | 282 gfx::Size GetViewportSizeOffsetDip() const; |
281 float GetOverdrawBottomHeightDip() const; | 283 float GetOverdrawBottomHeightDip() const; |
282 | 284 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
354 scoped_ptr<SyncInputEventFilter> input_event_filter_; | 356 scoped_ptr<SyncInputEventFilter> input_event_filter_; |
355 | 357 |
356 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 358 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
357 }; | 359 }; |
358 | 360 |
359 bool RegisterContentViewCore(JNIEnv* env); | 361 bool RegisterContentViewCore(JNIEnv* env); |
360 | 362 |
361 } // namespace content | 363 } // namespace content |
362 | 364 |
363 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 365 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
OLD | NEW |