Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: content/browser/android/content_view_core_impl.h

Issue 10952029: Remove native side of content_view_client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit fixes Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 11 matching lines...) Expand all
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 ui { 27 namespace ui {
28 class WindowAndroid; 28 class WindowAndroid;
29 } 29 }
30 30
31 namespace content { 31 namespace content {
32 class ContentViewClient;
33 class RenderWidgetHostViewAndroid; 32 class RenderWidgetHostViewAndroid;
34 33
35 // TODO(jrg): this is a shell. Upstream the rest. 34 // TODO(jrg): this is a shell. Upstream the rest.
36 class ContentViewCoreImpl : public ContentViewCore, 35 class ContentViewCoreImpl : public ContentViewCore,
37 public NotificationObserver { 36 public NotificationObserver {
38 public: 37 public:
39 ContentViewCoreImpl(JNIEnv* env, 38 ContentViewCoreImpl(JNIEnv* env,
40 jobject obj, 39 jobject obj,
41 bool hardware_accelerated, 40 bool hardware_accelerated,
42 bool take_ownership_of_web_contents, 41 bool take_ownership_of_web_contents,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 jboolean CanGoBack(JNIEnv* env, jobject obj); 117 jboolean CanGoBack(JNIEnv* env, jobject obj);
119 jboolean CanGoForward(JNIEnv* env, jobject obj); 118 jboolean CanGoForward(JNIEnv* env, jobject obj);
120 jboolean CanGoToOffset(JNIEnv* env, jobject obj, jint offset); 119 jboolean CanGoToOffset(JNIEnv* env, jobject obj, jint offset);
121 void GoBack(JNIEnv* env, jobject obj); 120 void GoBack(JNIEnv* env, jobject obj);
122 void GoForward(JNIEnv* env, jobject obj); 121 void GoForward(JNIEnv* env, jobject obj);
123 void GoToOffset(JNIEnv* env, jobject obj, jint offset); 122 void GoToOffset(JNIEnv* env, jobject obj, jint offset);
124 void StopLoading(JNIEnv* env, jobject obj); 123 void StopLoading(JNIEnv* env, jobject obj);
125 void Reload(JNIEnv* env, jobject obj); 124 void Reload(JNIEnv* env, jobject obj);
126 jboolean NeedsReload(JNIEnv* env, jobject obj); 125 jboolean NeedsReload(JNIEnv* env, jobject obj);
127 void ClearHistory(JNIEnv* env, jobject obj); 126 void ClearHistory(JNIEnv* env, jobject obj);
128 void SetClient(JNIEnv* env, jobject obj, jobject jclient);
129 jint EvaluateJavaScript(JNIEnv* env, jobject obj, jstring script); 127 jint EvaluateJavaScript(JNIEnv* env, jobject obj, jstring script);
130 int GetNativeImeAdapter(JNIEnv* env, jobject obj); 128 int GetNativeImeAdapter(JNIEnv* env, jobject obj);
131 void AddJavascriptInterface(JNIEnv* env, 129 void AddJavascriptInterface(JNIEnv* env,
132 jobject obj, 130 jobject obj,
133 jobject object, 131 jobject object,
134 jstring name, 132 jstring name,
135 jboolean require_annotation); 133 jboolean require_annotation);
136 void RemoveJavascriptInterface(JNIEnv* env, jobject obj, jstring name); 134 void RemoveJavascriptInterface(JNIEnv* env, jobject obj, jstring name);
137 int GetNavigationHistory(JNIEnv* env, jobject obj, jobject context); 135 int GetNavigationHistory(JNIEnv* env, jobject obj, jobject context);
138 136
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // A weak reference to the Java ContentViewCore object. 207 // A weak reference to the Java ContentViewCore object.
210 JavaObjectWeakGlobalRef java_ref_; 208 JavaObjectWeakGlobalRef java_ref_;
211 209
212 NotificationRegistrar notification_registrar_; 210 NotificationRegistrar notification_registrar_;
213 211
214 // Reference to the current WebContents used to determine how and what to 212 // Reference to the current WebContents used to determine how and what to
215 // display in the ContentViewCore. 213 // display in the ContentViewCore.
216 WebContentsImpl* web_contents_; 214 WebContentsImpl* web_contents_;
217 bool owns_web_contents_; 215 bool owns_web_contents_;
218 216
219 // We only set this to be the delegate of the web_contents if we own it.
220 scoped_ptr<ContentViewClient> content_view_client_;
221
222 // Whether the renderer backing this ContentViewCore has crashed. 217 // Whether the renderer backing this ContentViewCore has crashed.
223 bool tab_crashed_; 218 bool tab_crashed_;
224 219
225 // The owning window that has a hold of main application activity. 220 // The owning window that has a hold of main application activity.
226 ui::WindowAndroid* window_android_; 221 ui::WindowAndroid* window_android_;
227 222
228 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); 223 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl);
229 }; 224 };
230 225
231 bool RegisterContentViewCore(JNIEnv* env); 226 bool RegisterContentViewCore(JNIEnv* env);
232 227
233 } // namespace content 228 } // namespace content
234 229
235 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ 230 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/android/content_view_client.cc ('k') | content/browser/android/content_view_core_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698