| OLD | NEW |
| 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 "content/browser/android/content_settings.h" | 5 #include "content/browser/android/content_settings.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "content/browser/android/content_view_core_impl.h" | 8 #include "content/browser/android/content_view_core_impl.h" |
| 9 #include "content/browser/renderer_host/render_view_host_delegate.h" | 9 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
| 12 #include "content/public/common/webpreferences.h" |
| 12 #include "jni/ContentSettings_jni.h" | 13 #include "jni/ContentSettings_jni.h" |
| 13 #include "webkit/common/webpreferences.h" | |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 ContentSettings::ContentSettings(JNIEnv* env, | 17 ContentSettings::ContentSettings(JNIEnv* env, |
| 18 jobject obj, | 18 jobject obj, |
| 19 WebContents* contents) | 19 WebContents* contents) |
| 20 : WebContentsObserver(contents), | 20 : WebContentsObserver(contents), |
| 21 content_settings_(env, obj) { | 21 content_settings_(env, obj) { |
| 22 } | 22 } |
| 23 | 23 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 49 static jlong Init(JNIEnv* env, jobject obj, jlong nativeContentViewCore) { | 49 static jlong Init(JNIEnv* env, jobject obj, jlong nativeContentViewCore) { |
| 50 WebContents* web_contents = | 50 WebContents* web_contents = |
| 51 reinterpret_cast<ContentViewCoreImpl*>(nativeContentViewCore) | 51 reinterpret_cast<ContentViewCoreImpl*>(nativeContentViewCore) |
| 52 ->GetWebContents(); | 52 ->GetWebContents(); |
| 53 ContentSettings* content_settings = | 53 ContentSettings* content_settings = |
| 54 new ContentSettings(env, obj, web_contents); | 54 new ContentSettings(env, obj, web_contents); |
| 55 return reinterpret_cast<intptr_t>(content_settings); | 55 return reinterpret_cast<intptr_t>(content_settings); |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace content | 58 } // namespace content |
| OLD | NEW |