Chromium Code Reviews| 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 | 24 |
| 25 struct WebMenuItem; | 25 struct WebMenuItem; |
| 26 | 26 |
| 27 namespace base { | |
| 28 class Value; | |
| 29 } | |
| 30 | |
| 27 namespace ui { | 31 namespace ui { |
| 28 class WindowAndroid; | 32 class WindowAndroid; |
| 29 } | 33 } |
| 30 | 34 |
| 31 namespace content { | 35 namespace content { |
| 32 class RenderWidgetHostViewAndroid; | 36 class RenderWidgetHostViewAndroid; |
| 33 | 37 |
| 34 // TODO(jrg): this is a shell. Upstream the rest. | 38 // TODO(jrg): this is a shell. Upstream the rest. |
| 35 class ContentViewCoreImpl : public ContentViewCore, | 39 class ContentViewCoreImpl : public ContentViewCore, |
| 36 public NotificationObserver { | 40 public NotificationObserver { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 jboolean CanGoToOffset(JNIEnv* env, jobject obj, jint offset); | 153 jboolean CanGoToOffset(JNIEnv* env, jobject obj, jint offset); |
| 150 void GoBack(JNIEnv* env, jobject obj); | 154 void GoBack(JNIEnv* env, jobject obj); |
| 151 void GoForward(JNIEnv* env, jobject obj); | 155 void GoForward(JNIEnv* env, jobject obj); |
| 152 void GoToOffset(JNIEnv* env, jobject obj, jint offset); | 156 void GoToOffset(JNIEnv* env, jobject obj, jint offset); |
| 153 void StopLoading(JNIEnv* env, jobject obj); | 157 void StopLoading(JNIEnv* env, jobject obj); |
| 154 void Reload(JNIEnv* env, jobject obj); | 158 void Reload(JNIEnv* env, jobject obj); |
| 155 void CancelPendingReload(JNIEnv* env, jobject obj); | 159 void CancelPendingReload(JNIEnv* env, jobject obj); |
| 156 void ContinuePendingReload(JNIEnv* env, jobject obj); | 160 void ContinuePendingReload(JNIEnv* env, jobject obj); |
| 157 jboolean NeedsReload(JNIEnv* env, jobject obj); | 161 jboolean NeedsReload(JNIEnv* env, jobject obj); |
| 158 void ClearHistory(JNIEnv* env, jobject obj); | 162 void ClearHistory(JNIEnv* env, jobject obj); |
| 159 jint EvaluateJavaScript(JNIEnv* env, jobject obj, jstring script); | 163 void EvaluateJavaScript(JNIEnv* env, |
| 164 jobject obj, | |
| 165 jstring script, | |
| 166 jobject message); | |
| 160 int GetNativeImeAdapter(JNIEnv* env, jobject obj); | 167 int GetNativeImeAdapter(JNIEnv* env, jobject obj); |
| 161 void SetFocus(JNIEnv* env, jobject obj, jboolean focused); | 168 void SetFocus(JNIEnv* env, jobject obj, jboolean focused); |
| 162 void ScrollFocusedEditableNodeIntoView(JNIEnv* env, jobject obj); | 169 void ScrollFocusedEditableNodeIntoView(JNIEnv* env, jobject obj); |
| 163 void UndoScrollFocusedEditableNodeIntoView(JNIEnv* env, jobject obj); | 170 void UndoScrollFocusedEditableNodeIntoView(JNIEnv* env, jobject obj); |
| 164 | 171 |
| 165 jint GetBackgroundColor(JNIEnv* env, jobject obj); | 172 jint GetBackgroundColor(JNIEnv* env, jobject obj); |
| 166 void SetBackgroundColor(JNIEnv* env, jobject obj, jint color); | 173 void SetBackgroundColor(JNIEnv* env, jobject obj, jint color); |
| 167 void OnShow(JNIEnv* env, jobject obj); | 174 void OnShow(JNIEnv* env, jobject obj); |
| 168 void OnHide(JNIEnv* env, jobject obj); | 175 void OnHide(JNIEnv* env, jobject obj); |
| 169 void ClearSslPreferences(JNIEnv* env, jobject /* obj */); | 176 void ClearSslPreferences(JNIEnv* env, jobject /* obj */); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 252 class ContentViewUserData; | 259 class ContentViewUserData; |
| 253 | 260 |
| 254 friend class ContentViewUserData; | 261 friend class ContentViewUserData; |
| 255 virtual ~ContentViewCoreImpl(); | 262 virtual ~ContentViewCoreImpl(); |
| 256 | 263 |
| 257 // NotificationObserver implementation. | 264 // NotificationObserver implementation. |
| 258 virtual void Observe(int type, | 265 virtual void Observe(int type, |
| 259 const NotificationSource& source, | 266 const NotificationSource& source, |
| 260 const NotificationDetails& details) OVERRIDE; | 267 const NotificationDetails& details) OVERRIDE; |
| 261 | 268 |
| 269 // Notification that Javascript execution is complete. | |
|
joth
2013/01/05 00:54:42
probably should be in "Other private methods and
Avi (use Gerrit)
2013/01/05 01:03:34
Done.
| |
| 270 void JavaScriptResultCallback(ScopedJavaGlobalRef<jobject>* message, | |
| 271 const base::Value* result); | |
| 272 | |
| 262 // -------------------------------------------------------------------------- | 273 // -------------------------------------------------------------------------- |
| 263 // Other private methods and data | 274 // Other private methods and data |
| 264 // -------------------------------------------------------------------------- | 275 // -------------------------------------------------------------------------- |
| 265 | 276 |
| 266 void InitJNI(JNIEnv* env, jobject obj); | 277 void InitJNI(JNIEnv* env, jobject obj); |
| 267 | 278 |
| 268 void InitWebContents(); | 279 void InitWebContents(); |
| 269 | 280 |
| 270 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid(); | 281 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid(); |
| 271 | 282 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 ui::WindowAndroid* window_android_; | 320 ui::WindowAndroid* window_android_; |
| 310 | 321 |
| 311 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 322 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 312 }; | 323 }; |
| 313 | 324 |
| 314 bool RegisterContentViewCore(JNIEnv* env); | 325 bool RegisterContentViewCore(JNIEnv* env); |
| 315 | 326 |
| 316 } // namespace content | 327 } // namespace content |
| 317 | 328 |
| 318 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 329 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |