Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
|
jam
2012/06/08 23:45:09
since this file is just for Android, perhaps conte
John Grabowski
2012/06/12 01:46:30
We have somewhat conflicting standards here. When
jam
2012/06/12 17:44:02
that sounds good to me. I just checked and that's
| |
| 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 #pragma once | |
| 8 | |
| 9 #include <jni.h> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/android/jni_helper.h" | |
| 13 #include "base/memory/weak_ptr.h" | |
| 14 | |
| 15 class ContentViewClient; | |
|
jam
2012/06/08 23:45:09
nit: not used
| |
| 16 | |
| 17 namespace content { | |
| 18 class JavaScriptDialogCreator; | |
| 19 } | |
| 20 | |
| 21 namespace content { | |
| 22 // Native side of the ContentView.java, the primary FrameLayout of | |
| 23 // Chromium on Android. This is a public interface used by native | |
| 24 // code outside of the content/ hierarchy. | |
|
jam
2012/06/08 23:45:09
nit: "content/ hierarchy." -> "content module"
| |
| 25 // | |
| 26 // TODO(jrg): this is a shell. Upstream the rest. | |
| 27 class ContentView : public base::SupportsWeakPtr<ContentView> { | |
|
jam
2012/06/08 23:45:09
I'm curious why you need this to spuport weak poin
John Grabowski
2012/06/12 01:46:30
Those are details in methods we haven't upstreamed
jam
2012/06/12 17:44:02
even if it's still upstream, I'm wondering why you
John Grabowski
2012/06/13 22:12:29
From what I can tell.... a Java ContentView owns t
jam
2012/06/14 01:31:40
Just to be clear, is this a case that happens, or
John Grabowski
2012/06/14 04:20:49
I don't know if that example is true. I followed
jam
2012/06/14 16:08:57
I'd really prefer we avoid adding weakptr to publi
John Grabowski
2012/06/14 17:56:30
OK. Removed; added a TODO, merge warning, and bug
no sievers
2012/06/19 23:48:39
One case I remember is interstitials and the way t
| |
| 28 public: | |
| 29 ContentView(); | |
|
jam
2012/06/08 23:45:09
nit: don't need
John Grabowski
2012/06/12 01:46:30
will be very soon...
jam
2012/06/12 17:44:02
we only put interfaces in content/public. so I don
John Grabowski
2012/06/13 22:12:29
what I meant was, real soon the content_view ctor
| |
| 30 virtual void Destroy(JNIEnv* env, jobject obj) = 0; | |
| 31 | |
| 32 static ContentView* Create(JNIEnv* env, jobject obj); | |
| 33 static ContentView* GetNativeContentView(JNIEnv* env, jobject obj); | |
| 34 | |
| 35 protected: | |
| 36 virtual ~ContentView() = 0; | |
|
jam
2012/06/08 23:45:09
nit: inline this
John Grabowski
2012/06/12 01:46:30
I thought we were generally against inlining virtu
jam
2012/06/12 17:44:02
empty functions are fine though (compilers have em
John Grabowski
2012/06/13 22:12:29
done
| |
| 37 | |
| 38 private: | |
| 39 DISALLOW_COPY_AND_ASSIGN(ContentView); | |
|
jam
2012/06/08 23:45:09
nit: don't need on abstract classes, since you can
John Grabowski
2012/06/12 01:46:30
(For history: this only became an issue when I spl
| |
| 40 }; | |
| 41 | |
| 42 bool RegisterContentView(JNIEnv* env); | |
|
jam
2012/06/08 23:45:09
does this need to be exposed to embedders? I only
| |
| 43 | |
| 44 }; // namespace content | |
| 45 | |
| 46 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_VIEW_H_ | |
| OLD | NEW |