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_android.h" |
10 #include "base/android/jni_helper.h" | 11 #include "base/android/jni_helper.h" |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
13 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "base/process.h" | 16 #include "base/process.h" |
16 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 17 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
17 #include "content/browser/web_contents/web_contents_impl.h" | 18 #include "content/browser/web_contents/web_contents_impl.h" |
18 #include "content/public/browser/android/content_view_core.h" | 19 #include "content/public/browser/android/content_view_core.h" |
19 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 const gfx::Rect& end_rect, base::i18n::TextDirection end_dir); | 227 const gfx::Rect& end_rect, base::i18n::TextDirection end_dir); |
227 | 228 |
228 void StartContentIntent(const GURL& content_url); | 229 void StartContentIntent(const GURL& content_url); |
229 | 230 |
230 // Shows the disambiguation popup | 231 // Shows the disambiguation popup |
231 // |target_rect| --> window coordinates which |zoomed_bitmap| represents | 232 // |target_rect| --> window coordinates which |zoomed_bitmap| represents |
232 // |zoomed_bitmap| --> magnified image of potential touch targets | 233 // |zoomed_bitmap| --> magnified image of potential touch targets |
233 void ShowDisambiguationPopup( | 234 void ShowDisambiguationPopup( |
234 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap); | 235 const gfx::Rect& target_rect, const SkBitmap& zoomed_bitmap); |
235 | 236 |
| 237 // Creates a java-side smooth scroller. Used by |
| 238 // chrome.gpuBenchmarking.smoothScrollBy. |
| 239 base::android::ScopedJavaLocalRef<jobject> CreateSmoothScroller( |
| 240 bool scroll_down, int mouse_event_x, int mouse_event_y); |
| 241 |
236 // -------------------------------------------------------------------------- | 242 // -------------------------------------------------------------------------- |
237 // Methods called from native code | 243 // Methods called from native code |
238 // -------------------------------------------------------------------------- | 244 // -------------------------------------------------------------------------- |
239 | 245 |
240 gfx::Rect GetBounds() const; | 246 gfx::Rect GetBounds() const; |
241 | 247 |
242 void AttachLayer(scoped_refptr<cc::Layer> layer); | 248 void AttachLayer(scoped_refptr<cc::Layer> layer); |
243 void RemoveLayer(scoped_refptr<cc::Layer> layer); | 249 void RemoveLayer(scoped_refptr<cc::Layer> layer); |
244 void DidProduceRendererFrame(); | 250 void DidProduceRendererFrame(); |
245 | 251 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 ui::WindowAndroid* window_android_; | 310 ui::WindowAndroid* window_android_; |
305 | 311 |
306 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 312 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
307 }; | 313 }; |
308 | 314 |
309 bool RegisterContentViewCore(JNIEnv* env); | 315 bool RegisterContentViewCore(JNIEnv* env); |
310 | 316 |
311 } // namespace content | 317 } // namespace content |
312 | 318 |
313 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 319 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
OLD | NEW |