OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 5 #ifndef CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
6 #define CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 6 #define CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <unordered_map> | 11 #include <unordered_map> |
12 #include <utility> | 12 #include <utility> |
13 | 13 |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "chrome/common/insecure_content_renderer.mojom.h" | 15 #include "chrome/common/insecure_content_renderer.mojom.h" |
16 #include "components/content_settings/core/common/content_settings.h" | 16 #include "components/content_settings/core/common/content_settings.h" |
17 #include "components/content_settings/core/common/content_settings_types.h" | 17 #include "components/content_settings/core/common/content_settings_types.h" |
18 #include "content/public/renderer/render_frame_observer.h" | 18 #include "content/public/renderer/render_frame_observer.h" |
19 #include "content/public/renderer/render_frame_observer_tracker.h" | 19 #include "content/public/renderer/render_frame_observer_tracker.h" |
20 #include "extensions/features/features.h" | 20 #include "extensions/features/features.h" |
21 #include "mojo/public/cpp/bindings/binding_set.h" | 21 #include "mojo/public/cpp/bindings/binding_set.h" |
| 22 #include "services/service_manager/public/cpp/bind_source_info.h" |
22 #include "third_party/WebKit/public/platform/WebContentSettingsClient.h" | 23 #include "third_party/WebKit/public/platform/WebContentSettingsClient.h" |
23 #include "url/gurl.h" | 24 #include "url/gurl.h" |
24 | 25 |
25 namespace blink { | 26 namespace blink { |
26 class WebFrame; | 27 class WebFrame; |
27 class WebSecurityOrigin; | 28 class WebSecurityOrigin; |
28 class WebURL; | 29 class WebURL; |
29 } | 30 } |
30 | 31 |
31 namespace extensions { | 32 namespace extensions { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // RenderFrameObserver implementation. | 99 // RenderFrameObserver implementation. |
99 bool OnMessageReceived(const IPC::Message& message) override; | 100 bool OnMessageReceived(const IPC::Message& message) override; |
100 void DidCommitProvisionalLoad(bool is_new_navigation, | 101 void DidCommitProvisionalLoad(bool is_new_navigation, |
101 bool is_same_document_navigation) override; | 102 bool is_same_document_navigation) override; |
102 void OnDestruct() override; | 103 void OnDestruct() override; |
103 | 104 |
104 // chrome::mojom::InsecureContentRenderer: | 105 // chrome::mojom::InsecureContentRenderer: |
105 void SetAllowRunningInsecureContent() override; | 106 void SetAllowRunningInsecureContent() override; |
106 | 107 |
107 void OnInsecureContentRendererRequest( | 108 void OnInsecureContentRendererRequest( |
| 109 const service_manager::BindSourceInfo& source_info, |
108 chrome::mojom::InsecureContentRendererRequest request); | 110 chrome::mojom::InsecureContentRendererRequest request); |
109 | 111 |
110 // Message handlers. | 112 // Message handlers. |
111 void OnLoadBlockedPlugins(const std::string& identifier); | 113 void OnLoadBlockedPlugins(const std::string& identifier); |
112 void OnSetAsInterstitial(); | 114 void OnSetAsInterstitial(); |
113 void OnRequestFileSystemAccessAsyncResponse(int request_id, bool allowed); | 115 void OnRequestFileSystemAccessAsyncResponse(int request_id, bool allowed); |
114 | 116 |
115 // Resets the |content_blocked_| array. | 117 // Resets the |content_blocked_| array. |
116 void ClearBlockedContentSettings(); | 118 void ClearBlockedContentSettings(); |
117 | 119 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // If true, IsWhitelistedForContentSettings will always return true. | 170 // If true, IsWhitelistedForContentSettings will always return true. |
169 const bool should_whitelist_; | 171 const bool should_whitelist_; |
170 | 172 |
171 mojo::BindingSet<chrome::mojom::InsecureContentRenderer> | 173 mojo::BindingSet<chrome::mojom::InsecureContentRenderer> |
172 insecure_content_renderer_bindings_; | 174 insecure_content_renderer_bindings_; |
173 | 175 |
174 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); | 176 DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); |
175 }; | 177 }; |
176 | 178 |
177 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ | 179 #endif // CHROME_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ |
OLD | NEW |