1234567891011121314151617181920212223242526272829303132333435363738394041 |
- // Copyright 2013 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 ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_
- #define ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_
- #include "content/public/renderer/render_frame_observer.h"
- #include "third_party/blink/public/platform/web_content_settings_client.h"
- namespace android_webview {
- // Android WebView implementation of blink::WebContentSettingsClient.
- class AwContentSettingsClient : public content::RenderFrameObserver,
- public blink::WebContentSettingsClient {
- public:
- explicit AwContentSettingsClient(content::RenderFrame* render_view);
- AwContentSettingsClient(const AwContentSettingsClient&) = delete;
- AwContentSettingsClient& operator=(const AwContentSettingsClient&) = delete;
- private:
- ~AwContentSettingsClient() override;
- // content::RenderFrameObserver implementation.
- void OnDestruct() override;
- // blink::WebContentSettingsClient implementation.
- bool AllowImage(bool enabled_per_settings,
- const blink::WebURL& image_url) override;
- bool AllowScript(bool enabled_per_settings) override;
- bool AllowRunningInsecureContent(bool enabled_per_settings,
- const blink::WebURL& url) override;
- bool ShouldAutoupgradeMixedContent() override;
- bool ShouldAllowlistForContentSettings() const;
- };
- } // namespace android_webview
- #endif // ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_
|