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

Unified Diff: android_webview/native/aw_contents.h

Issue 10855171: Add a test runner for android_webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address feedback Created 8 years, 4 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
« no previous file with comments | « android_webview/native/aw_browser_dependency_factory.cc ('k') | android_webview/native/aw_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.h
diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
new file mode 100644
index 0000000000000000000000000000000000000000..b37511af96d0e05f6a746ae4c7fd38368c20121d
--- /dev/null
+++ b/android_webview/native/aw_contents.h
@@ -0,0 +1,51 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
+#define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
+
+#include <jni.h>
+
+#include "base/android/jni_helper.h"
+#include "base/memory/scoped_ptr.h"
+
+class TabContents;
+
+namespace content {
+class WebContents;
+}
+
+namespace android_webview {
+
+class AwContentsContainer;
+class AwWebContentsDelegate;
+
+// Native side of java-class of same name.
+// Provides the ownership of and access to browser components required for
+// WebView functionality; analogous to chrome's TabContents, but with a
+// level of indirection provided by the AwContentsContainer abstraction.
+class AwContents {
+ public:
+ AwContents(JNIEnv* env,
+ jobject obj,
+ jobject web_contents_delegate,
+ bool private_browsing);
+ ~AwContents();
+
+ jint GetWebContents(JNIEnv* env, jobject obj);
+ void Destroy(JNIEnv* env, jobject obj);
+
+ private:
+ JavaObjectWeakGlobalRef java_ref_;
+ scoped_ptr<AwContentsContainer> contents_container_;
+ scoped_ptr<AwWebContentsDelegate> web_contents_delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(AwContents);
+};
+
+bool RegisterAwContents(JNIEnv* env);
+
+} // namespace android_webview
+
+#endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
« no previous file with comments | « android_webview/native/aw_browser_dependency_factory.cc ('k') | android_webview/native/aw_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698