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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 void SendGestureEvent(WebKit::WebInputEvent::Type type, long time_ms, | 189 void SendGestureEvent(WebKit::WebInputEvent::Type type, long time_ms, |
190 int x, int y, | 190 int x, int y, |
191 float dx, float dy, bool link_preview_tap); | 191 float dx, float dy, bool link_preview_tap); |
192 | 192 |
193 void PostLoadUrl(const GURL& url); | 193 void PostLoadUrl(const GURL& url); |
194 | 194 |
195 struct JavaObject; | 195 struct JavaObject; |
196 JavaObject* java_object_; | 196 JavaObject* java_object_; |
197 | 197 |
| 198 // A weak reference to the Java ContentViewCore object. |
| 199 JavaObjectWeakGlobalRef java_ref_; |
| 200 |
198 NotificationRegistrar notification_registrar_; | 201 NotificationRegistrar notification_registrar_; |
199 | 202 |
200 // Reference to the current WebContents used to determine how and what to | 203 // Reference to the current WebContents used to determine how and what to |
201 // display in the ContentViewCore. | 204 // display in the ContentViewCore. |
202 WebContentsImpl* web_contents_; | 205 WebContentsImpl* web_contents_; |
203 | 206 |
204 // We only set this to be the delegate of the web_contents if we own it. | 207 // We only set this to be the delegate of the web_contents if we own it. |
205 scoped_ptr<ContentViewClient> content_view_client_; | 208 scoped_ptr<ContentViewClient> content_view_client_; |
206 | 209 |
207 // Whether the renderer backing this ContentViewCore has crashed. | 210 // Whether the renderer backing this ContentViewCore has crashed. |
208 bool tab_crashed_; | 211 bool tab_crashed_; |
209 | 212 |
210 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 213 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
211 }; | 214 }; |
212 | 215 |
213 bool RegisterContentViewCore(JNIEnv* env); | 216 bool RegisterContentViewCore(JNIEnv* env); |
214 | 217 |
215 } // namespace content | 218 } // namespace content |
216 | 219 |
217 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 220 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
OLD | NEW |