| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_ |
| 6 #define ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/public/renderer/render_frame_observer.h" | 9 #include "content/public/renderer/render_frame_observer.h" |
| 10 #include "third_party/WebKit/public/web/WebContentSettingsClient.h" | 10 #include "third_party/WebKit/public/web/WebContentSettingsClient.h" |
| 11 | 11 |
| 12 namespace android_webview { | 12 namespace android_webview { |
| 13 | 13 |
| 14 // Android WebView implementation of blink::WebContentSettingsClient. | 14 // Android WebView implementation of blink::WebContentSettingsClient. |
| 15 class AwContentSettingsClient : public content::RenderFrameObserver, | 15 class AwContentSettingsClient : public content::RenderFrameObserver, |
| 16 public blink::WebContentSettingsClient { | 16 public blink::WebContentSettingsClient { |
| 17 public: | 17 public: |
| 18 explicit AwContentSettingsClient(content::RenderFrame* render_view); | 18 explicit AwContentSettingsClient(content::RenderFrame* render_view); |
| 19 | 19 |
| 20 private: | 20 private: |
| 21 ~AwContentSettingsClient() override; | 21 ~AwContentSettingsClient() override; |
| 22 | 22 |
| 23 // blink::WebContentSettingsClient implementation. | 23 // blink::WebContentSettingsClient implementation. |
| 24 bool allowDisplayingInsecureContent( | 24 bool allowDisplayingInsecureContent( |
| 25 bool enabled_per_settings, | 25 bool enabled_per_settings, |
| 26 const blink::WebSecurityOrigin& origin, | |
| 27 const blink::WebURL& url) override; | 26 const blink::WebURL& url) override; |
| 28 bool allowRunningInsecureContent( | 27 bool allowRunningInsecureContent( |
| 29 bool enabled_per_settings, | 28 bool enabled_per_settings, |
| 30 const blink::WebSecurityOrigin& origin, | 29 const blink::WebSecurityOrigin& origin, |
| 31 const blink::WebURL& url) override; | 30 const blink::WebURL& url) override; |
| 32 | 31 |
| 33 DISALLOW_COPY_AND_ASSIGN(AwContentSettingsClient); | 32 DISALLOW_COPY_AND_ASSIGN(AwContentSettingsClient); |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 } // namespace android_webview | 35 } // namespace android_webview |
| 37 | 36 |
| 38 #endif // ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_ | 37 #endif // ANDROID_WEBVIEW_RENDERER_AW_CONTENT_SETTINGS_CLIENT_H_ |
| OLD | NEW |