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

Side by Side Diff: content/public/browser/android/content_view_core.h

Issue 11067002: Move ContentViewCore native ownership to WebContents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: jcivelli feedback Created 8 years, 2 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include <jni.h> 9 #include <jni.h>
10 10
11 #include "content/public/browser/navigation_controller.h" 11 #include "content/public/browser/navigation_controller.h"
12 12
13 namespace ui { 13 namespace ui {
14 class WindowAndroid; 14 class WindowAndroid;
15 } 15 }
16 16
17 namespace content { 17 namespace content {
18 class WebContents; 18 class WebContents;
19 19
20 // Native side of the ContentViewCore.java, which is the primary way of 20 // Native side of the ContentViewCore.java, which is the primary way of
21 // communicating with the native Chromium code on Android. This is a 21 // communicating with the native Chromium code on Android. This is a
22 // public interface used by native code outside of the content module. 22 // public interface used by native code outside of the content module.
23 class ContentViewCore { 23 class ContentViewCore {
24 public: 24 public:
25 static ContentViewCore* Create( 25 // Returns the existing ContentViewCore for |web_contents|, or NULL.
26 JNIEnv* env, jobject obj, WebContents* web_contents); 26 static ContentViewCore* FromWebContents(WebContents* web_contents);
27 static ContentViewCore* GetNativeContentViewCore(JNIEnv* env, jobject obj); 27 static ContentViewCore* GetNativeContentViewCore(JNIEnv* env, jobject obj);
28 28
29 virtual void Destroy(JNIEnv* env, jobject obj) = 0;
30 virtual WebContents* GetWebContents() const = 0; 29 virtual WebContents* GetWebContents() const = 0;
31 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; 30 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0;
32 virtual ui::WindowAndroid* GetWindowAndroid() = 0; 31 virtual ui::WindowAndroid* GetWindowAndroid() = 0;
33 virtual void LoadUrl(NavigationController::LoadURLParams& params) = 0; 32 virtual void LoadUrl(NavigationController::LoadURLParams& params) = 0;
34 virtual void OnWebPreferencesUpdated() = 0; 33 virtual void OnWebPreferencesUpdated() = 0;
35 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) = 0; 34 virtual jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj) = 0;
36 35
37 protected: 36 protected:
38 virtual ~ContentViewCore() {}; 37 virtual ~ContentViewCore() {};
39 }; 38 };
40 39
41 }; // namespace content 40 }; // namespace content
42 41
43 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 42 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698