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" |
(...skipping 14 matching lines...) Expand all Loading... | |
25 struct WebMenuItem; | 25 struct WebMenuItem; |
26 | 26 |
27 namespace ui { | 27 namespace ui { |
28 class WindowAndroid; | 28 class WindowAndroid; |
29 } | 29 } |
30 | 30 |
31 namespace content { | 31 namespace content { |
32 class RenderWidgetHostViewAndroid; | 32 class RenderWidgetHostViewAndroid; |
33 class SyncInputEventFilter; | 33 class SyncInputEventFilter; |
34 | 34 |
35 // TODO(jrg): this is a shell. Upstream the rest. | 35 // TODO(jrg): this is a shell. Upstream the rest. |
joth
2013/04/12 17:56:24
think this can go now :-)
| |
36 class ContentViewCoreImpl : public ContentViewCore, | 36 class ContentViewCoreImpl : public ContentViewCore, |
37 public NotificationObserver { | 37 public NotificationObserver { |
38 public: | 38 public: |
39 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); | 39 static ContentViewCoreImpl* FromWebContents(WebContents* web_contents); |
40 ContentViewCoreImpl(JNIEnv* env, | 40 ContentViewCoreImpl(JNIEnv* env, |
41 jobject obj, | 41 jobject obj, |
42 bool hardware_accelerated, | 42 bool hardware_accelerated, |
43 bool input_events_delivered_at_vsync, | 43 bool input_events_delivered_at_vsync, |
44 WebContents* web_contents, | 44 WebContents* web_contents, |
45 ui::WindowAndroid* window_android); | 45 ui::WindowAndroid* window_android); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
264 void StartContentIntent(const GURL& content_url); | 264 void StartContentIntent(const GURL& content_url); |
265 | 265 |
266 // Shows the disambiguation popup | 266 // Shows the disambiguation popup |
267 // |target_rect| --> window coordinates which |zoomed_bitmap| represents | 267 // |target_rect| --> window coordinates which |zoomed_bitmap| represents |
268 // |zoomed_bitmap| --> magnified image of potential touch targets | 268 // |zoomed_bitmap| --> magnified image of potential touch targets |
269 void ShowDisambiguationPopup( | 269 void ShowDisambiguationPopup( |
270 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap); | 270 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap); |
271 | 271 |
272 void RequestExternalVideoSurface(int player_id); | 272 void RequestExternalVideoSurface(int player_id); |
273 | 273 |
274 base::android::ScopedJavaLocalRef<jobject> GetContentVideoViewClient(); | |
275 | |
276 // Returns the Activity context associated with ContentViewCore. | |
277 // Note: This context is different with base::android::GetApplicationContext() . | |
278 base::android::ScopedJavaLocalRef<jobject> GetContext(); | |
joth
2013/04/12 17:56:24
This is misleading, as CVC can be used without an
michaelbai
2013/04/18 18:21:59
Done.
| |
279 | |
274 // -------------------------------------------------------------------------- | 280 // -------------------------------------------------------------------------- |
275 // Methods called from native code | 281 // Methods called from native code |
276 // -------------------------------------------------------------------------- | 282 // -------------------------------------------------------------------------- |
277 | 283 |
278 gfx::Size GetPhysicalBackingSize() const; | 284 gfx::Size GetPhysicalBackingSize() const; |
279 gfx::Size GetViewportSizeDip() const; | 285 gfx::Size GetViewportSizeDip() const; |
280 gfx::Size GetViewportSizeOffsetDip() const; | 286 gfx::Size GetViewportSizeOffsetDip() const; |
281 float GetOverdrawBottomHeightDip() const; | 287 float GetOverdrawBottomHeightDip() const; |
282 | 288 |
283 InputEventAckState FilterInputEvent(const WebKit::WebInputEvent& input_event); | 289 InputEventAckState FilterInputEvent(const WebKit::WebInputEvent& input_event); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
354 scoped_ptr<SyncInputEventFilter> input_event_filter_; | 360 scoped_ptr<SyncInputEventFilter> input_event_filter_; |
355 | 361 |
356 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 362 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
357 }; | 363 }; |
358 | 364 |
359 bool RegisterContentViewCore(JNIEnv* env); | 365 bool RegisterContentViewCore(JNIEnv* env); |
360 | 366 |
361 } // namespace content | 367 } // namespace content |
362 | 368 |
363 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 369 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
OLD | NEW |