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

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

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

Powered by Google App Engine
This is Rietveld 408576698