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

Unified Diff: content/public/browser/content_view.h

Issue 10536066: android content shell bringup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comments Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/content_view.h
diff --git a/content/public/browser/content_view.h b/content/public/browser/content_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..05951b2fe3f31312c72016256bb8c8a086d75278
--- /dev/null
+++ b/content/public/browser/content_view.h
@@ -0,0 +1,46 @@
+// 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
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_CONTENT_VIEW_H_
+#define CONTENT_PUBLIC_BROWSER_CONTENT_VIEW_H_
+#pragma once
+
+#include <jni.h>
+#include <vector>
+
+#include "base/android/jni_helper.h"
+#include "base/memory/weak_ptr.h"
+
+class ContentViewClient;
jam 2012/06/08 23:45:09 nit: not used
+
+namespace content {
+class JavaScriptDialogCreator;
+}
+
+namespace content {
+// Native side of the ContentView.java, the primary FrameLayout of
+// Chromium on Android. This is a public interface used by native
+// code outside of the content/ hierarchy.
jam 2012/06/08 23:45:09 nit: "content/ hierarchy." -> "content module"
+//
+// TODO(jrg): this is a shell. Upstream the rest.
+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
+ public:
+ 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
+ virtual void Destroy(JNIEnv* env, jobject obj) = 0;
+
+ static ContentView* Create(JNIEnv* env, jobject obj);
+ static ContentView* GetNativeContentView(JNIEnv* env, jobject obj);
+
+ protected:
+ 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
+
+ private:
+ 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
+};
+
+bool RegisterContentView(JNIEnv* env);
jam 2012/06/08 23:45:09 does this need to be exposed to embedders? I only
+
+}; // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_CONTENT_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698