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

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 10946008: Componentize IgnoreNavigationResourceThrottle and add chrome and webview specific implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/native/aw_contents.h" 5 #include "android_webview/native/aw_contents.h"
6 6
7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" 7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
8 #include "android_webview/native/aw_browser_dependency_factory.h" 8 #include "android_webview/native/aw_browser_dependency_factory.h"
9 #include "android_webview/native/aw_contents_container.h" 9 #include "android_webview/native/aw_contents_container.h"
10 #include "android_webview/native/aw_web_contents_delegate.h" 10 #include "android_webview/native/aw_web_contents_delegate.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 jint AwContents::GetWebContents(JNIEnv* env, jobject obj) { 82 jint AwContents::GetWebContents(JNIEnv* env, jobject obj) {
83 return reinterpret_cast<jint>(contents_container_->GetWebContents()); 83 return reinterpret_cast<jint>(contents_container_->GetWebContents());
84 } 84 }
85 85
86 void AwContents::Destroy(JNIEnv* env, jobject obj) { 86 void AwContents::Destroy(JNIEnv* env, jobject obj) {
87 delete this; 87 delete this;
88 } 88 }
89 89
90 AwWebContentsDelegate* AwContents::GetAwWebContentsDelegate() const {
91 return web_contents_delegate_.get();
92 }
93
90 namespace { 94 namespace {
91 // |message| is passed as base::Owned, so it will automatically be deleted 95 // |message| is passed as base::Owned, so it will automatically be deleted
92 // when the callback goes out of scope. 96 // when the callback goes out of scope.
93 void DocumentHasImagesCallback(ScopedJavaGlobalRef<jobject>* message, 97 void DocumentHasImagesCallback(ScopedJavaGlobalRef<jobject>* message,
94 bool has_images) { 98 bool has_images) {
95 Java_AwContents_onDocumentHasImagesResponse(AttachCurrentThread(), 99 Java_AwContents_onDocumentHasImagesResponse(AttachCurrentThread(),
96 has_images, 100 has_images,
97 message->obj()); 101 message->obj());
98 } 102 }
99 } // namespace 103 } // namespace
(...skipping 25 matching lines...) Expand all
125 private_browsing); 129 private_browsing);
126 return reinterpret_cast<jint>(tab); 130 return reinterpret_cast<jint>(tab);
127 } 131 }
128 132
129 bool RegisterAwContents(JNIEnv* env) { 133 bool RegisterAwContents(JNIEnv* env) {
130 return RegisterNativesImpl(env) >= 0; 134 return RegisterNativesImpl(env) >= 0;
131 } 135 }
132 136
133 137
134 } // namespace android_webview 138 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698