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

Unified Diff: chrome/browser/android/document/document_web_contents_delegate.cc

Issue 1141283003: Upstream oodles of Chrome for Android code into Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final patch? Created 5 years, 7 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: chrome/browser/android/document/document_web_contents_delegate.cc
diff --git a/chrome/browser/android/document/document_web_contents_delegate.cc b/chrome/browser/android/document/document_web_contents_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..760720fca5d927ff707cbb51af88cc5b98631b83
--- /dev/null
+++ b/chrome/browser/android/document/document_web_contents_delegate.cc
@@ -0,0 +1,61 @@
+// Copyright 2015 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.
+
+#include "chrome/browser/android/document/document_web_contents_delegate.h"
+
+#include "components/web_contents_delegate_android/web_contents_delegate_android.h"
+#include "content/public/browser/web_contents.h"
+#include "jni/DocumentWebContentsDelegate_jni.h"
+
+DocumentWebContentsDelegate::DocumentWebContentsDelegate(JNIEnv* env,
+ jobject obj)
+ : WebContentsDelegateAndroid(env, obj) {
+}
+
+DocumentWebContentsDelegate::~DocumentWebContentsDelegate() {
+}
+
+void DocumentWebContentsDelegate::AttachContents(JNIEnv* env,
+ jobject jcaller,
+ jobject jweb_contents) {
+ content::WebContents* web_contents =
+ content::WebContents::FromJavaWebContents(jweb_contents);
+ web_contents->SetDelegate(this);
+}
+
+bool DocumentWebContentsDelegate::Register(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+void DocumentWebContentsDelegate::AddNewContents(
+ content::WebContents* source,
+ content::WebContents* new_contents,
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_pos,
+ bool user_gesture,
+ bool* was_blocked) {
+ NOTREACHED();
+}
+
+void DocumentWebContentsDelegate::CloseContents(content::WebContents* source) {
+ NOTREACHED();
+}
+
+bool DocumentWebContentsDelegate::ShouldCreateWebContents(
+ content::WebContents* web_contents,
+ int route_id,
+ int main_frame_route_id,
+ WindowContainerType window_container_type,
+ const base::string16& frame_name,
+ const GURL& target_url,
+ const std::string& partition_id,
+ content::SessionStorageNamespace* session_storage_namespace) {
+ NOTREACHED();
+ return false;
+}
+
+
+static jlong Initialize(JNIEnv* env, jobject obj) {
+ return reinterpret_cast<intptr_t>(new DocumentWebContentsDelegate(env, obj));
+}
« no previous file with comments | « chrome/browser/android/document/document_web_contents_delegate.h ('k') | chrome/browser/android/history_report/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698