blob: 5c0f9a025ba83c262944d81128d969edc8d587cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// Copyright (c) 2012 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.
#ifndef CONTENT_BROWSER_ANDROID_CONTENT_SETTINGS_H_
#define CONTENT_BROWSER_ANDROID_CONTENT_SETTINGS_H_
#include <jni.h>
#include "base/android/jni_helper.h"
#include "content/public/browser/web_contents_observer.h"
namespace content {
class ContentSettings : public WebContentsObserver {
public:
ContentSettings(JNIEnv* env, jobject obj,
WebContents* contents);
static bool RegisterContentSettings(JNIEnv* env);
bool GetJavaScriptEnabled(JNIEnv* env, jobject obj);
private:
// Self-deletes when the underlying WebContents is destroyed.
virtual ~ContentSettings();
// WebContentsObserver overrides:
virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE;
// The Java counterpart to this class.
JavaObjectWeakGlobalRef content_settings_;
};
} // namespace content
#endif // CONTENT_BROWSER_ANDROID_CONTENT_SETTINGS_H_
|