summaryrefslogtreecommitdiffstats
path: root/android_webview/renderer/aw_content_settings_client.h
blob: 7f289601fe19a618bc30175b49f20bf3bf58f269 (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 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 "base/macros.h"
#include "content/public/renderer/render_frame_observer.h"
#include "third_party/WebKit/public/web/WebContentSettingsClient.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);

 private:
  ~AwContentSettingsClient() override;

  // blink::WebContentSettingsClient implementation.
  bool allowDisplayingInsecureContent(
      bool enabled_per_settings,
      const blink::WebURL& url) override;
  bool allowRunningInsecureContent(
      bool enabled_per_settings,
      const blink::WebSecurityOrigin& origin,
      const blink::WebURL& url) override;

  DISALLOW_COPY_AND_ASSIGN(AwContentSettingsClient);
};

}  // namespace android_webview

#endif  // ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_