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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/android/document/document_web_contents_delegate.h"
6
7 #include "components/web_contents_delegate_android/web_contents_delegate_android .h"
8 #include "content/public/browser/web_contents.h"
9 #include "jni/DocumentWebContentsDelegate_jni.h"
10
11 DocumentWebContentsDelegate::DocumentWebContentsDelegate(JNIEnv* env,
12 jobject obj)
13 : WebContentsDelegateAndroid(env, obj) {
14 }
15
16 DocumentWebContentsDelegate::~DocumentWebContentsDelegate() {
17 }
18
19 void DocumentWebContentsDelegate::AttachContents(JNIEnv* env,
20 jobject jcaller,
21 jobject jweb_contents) {
22 content::WebContents* web_contents =
23 content::WebContents::FromJavaWebContents(jweb_contents);
24 web_contents->SetDelegate(this);
25 }
26
27 bool DocumentWebContentsDelegate::Register(JNIEnv* env) {
28 return RegisterNativesImpl(env);
29 }
30
31 void DocumentWebContentsDelegate::AddNewContents(
32 content::WebContents* source,
33 content::WebContents* new_contents,
34 WindowOpenDisposition disposition,
35 const gfx::Rect& initial_pos,
36 bool user_gesture,
37 bool* was_blocked) {
38 NOTREACHED();
39 }
40
41 void DocumentWebContentsDelegate::CloseContents(content::WebContents* source) {
42 NOTREACHED();
43 }
44
45 bool DocumentWebContentsDelegate::ShouldCreateWebContents(
46 content::WebContents* web_contents,
47 int route_id,
48 int main_frame_route_id,
49 WindowContainerType window_container_type,
50 const base::string16& frame_name,
51 const GURL& target_url,
52 const std::string& partition_id,
53 content::SessionStorageNamespace* session_storage_namespace) {
54 NOTREACHED();
55 return false;
56 }
57
58
59 static jlong Initialize(JNIEnv* env, jobject obj) {
60 return reinterpret_cast<intptr_t>(new DocumentWebContentsDelegate(env, obj));
61 }
OLDNEW
« 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