OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_VIEW_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_VIEW_H_ | |
7 | |
8 #include <jni.h> | |
9 | |
10 class GURL; | |
11 | |
12 namespace content { | |
13 | |
14 class WebContents; | |
15 | |
16 // Native side of the ContentView.java, the primary FrameLayout of | |
17 // Chromium on Android. This is a public interface used by native | |
18 // code outside of the content module. | |
19 // | |
20 // TODO(jrg): this is a shell. Upstream the rest. | |
21 // | |
22 // TODO(jrg): downstream, this class derives from | |
23 // base::SupportsWeakPtr<ContentView>. Issues raised in | |
24 // http://codereview.chromium.org/10536066/ make us want to rethink | |
25 // ownership issues. | |
26 // FOR THE MERGE (downstream), re-add derivation from | |
27 // base::SupportsWeakPtr<ContentView> to keep everything else working | |
28 // until this issue is resolved. | |
29 // http://b/6666045 | |
30 class ContentView { | |
31 public: | |
32 virtual void Destroy(JNIEnv* env, jobject obj) = 0; | |
33 | |
34 static ContentView* Create(JNIEnv* env, jobject obj, | |
35 WebContents* web_contents); | |
36 static ContentView* GetNativeContentView(JNIEnv* env, jobject obj); | |
37 | |
38 // -------------------------------------------------------------------------- | |
39 // Public methods that call to Java via JNI | |
40 // -------------------------------------------------------------------------- | |
41 | |
42 virtual void StartContentIntent(const GURL& content_url) = 0; | |
43 | |
44 protected: | |
45 virtual ~ContentView() {}; | |
46 }; | |
47 | |
48 }; // namespace content | |
49 | |
50 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_VIEW_H_ | |
OLD | NEW |