Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / browser / android / content_settings.h
blob0728a6afabbc75db46baa8055057927fb6197591
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_SETTINGS_H_
6 #define CONTENT_BROWSER_ANDROID_CONTENT_SETTINGS_H_
8 #include <jni.h>
10 #include "base/android/jni_weak_ref.h"
11 #include "content/public/browser/web_contents_observer.h"
13 namespace content {
15 class ContentSettings : public WebContentsObserver {
16 public:
17 ContentSettings(JNIEnv* env, jobject obj,
18 WebContents* contents);
20 static bool RegisterContentSettings(JNIEnv* env);
22 bool GetJavaScriptEnabled(JNIEnv* env, jobject obj);
24 private:
25 // Self-deletes when the underlying WebContents is destroyed.
26 virtual ~ContentSettings();
28 // WebContentsObserver overrides:
29 virtual void WebContentsDestroyed() OVERRIDE;
31 // The Java counterpart to this class.
32 JavaObjectWeakGlobalRef content_settings_;
35 } // namespace content
37 #endif // CONTENT_BROWSER_ANDROID_CONTENT_SETTINGS_H_