1 // Copyright 2016 Samsung Electronics. 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_SETTINGS_CLIENT_EFL_H_
6 #define CONTENT_SETTINGS_CLIENT_EFL_H_
8 #include "content/public/renderer/render_frame_observer.h"
10 #if defined(OS_TIZEN_TV_PRODUCT)
11 #include "content/public/renderer/render_frame_observer_tracker.h"
13 #include "third_party/WebKit/public/web/WebContentSettingsClient.h"
17 class ContentSettingsClientEfl
18 : public RenderFrameObserver,
19 #if defined(OS_TIZEN_TV_PRODUCT)
20 public RenderFrameObserverTracker<ContentSettingsClientEfl>,
22 public blink::WebContentSettingsClient {
24 explicit ContentSettingsClientEfl(RenderFrame* render_view);
25 ~ContentSettingsClientEfl() override;
27 // content::RenderFrameObserver implementation.
28 void OnDestruct() override;
30 // blink::WebContentSettingsClient implementation.
31 void didNotAllowScript() override;
33 #if defined(OS_TIZEN_TV_PRODUCT)
34 // blink::WebContentSettingsClient implementation.
35 bool allowRunningInsecureContent(bool allowed_per_settings,
36 const blink::WebSecurityOrigin& context,
37 const blink::WebURL& url) override;
38 bool OnMessageReceived(const IPC::Message& message) override;
42 #if defined(OS_TIZEN_TV_PRODUCT)
43 bool allowInsecureContent(bool allowed_per_settings);
44 void OnSetAllowInsecureContent(bool allow);
46 // Insecure content may be permitted for the duration of this render view.
47 bool mixed_content_state_;
48 bool allow_insecure_content_;
50 DISALLOW_COPY_AND_ASSIGN(ContentSettingsClientEfl);
53 } // namespace content
55 #endif // CONTENT_SETTINGS_CLIENT_EFL_H