OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_BROWSER_PLUGIN_CONTENT_ORIGIN_WHITELIST_H_ | 5 #ifndef CONTENT_BROWSER_PLUGIN_CONTENT_ORIGIN_WHITELIST_H_ |
6 #define CONTENT_BROWSER_PLUGIN_CONTENT_ORIGIN_WHITELIST_H_ | 6 #define CONTENT_BROWSER_PLUGIN_CONTENT_ORIGIN_WHITELIST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
11 #include "url/gurl.h" | 11 #include "url/origin.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class WebContents; | 15 class WebContents; |
16 | 16 |
17 // This class manages the tab-wide list of temporarily whitelisted plugin | 17 // This class manages the tab-wide list of temporarily whitelisted plugin |
18 // content origins that are exempt from power saving. | 18 // content origins that are exempt from power saving. |
19 // | 19 // |
20 // RenderFrames report content origins that should be whitelisted via IPC. | 20 // RenderFrames report content origins that should be whitelisted via IPC. |
21 // This class aggregates those origins and broadcasts the total list to all | 21 // This class aggregates those origins and broadcasts the total list to all |
(...skipping 10 matching lines...) Expand all Loading... |
32 | 32 |
33 private: | 33 private: |
34 // WebContentsObserver implementation. | 34 // WebContentsObserver implementation. |
35 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; | 35 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; |
36 bool OnMessageReceived(const IPC::Message& message, | 36 bool OnMessageReceived(const IPC::Message& message, |
37 RenderFrameHost* render_frame_host) override; | 37 RenderFrameHost* render_frame_host) override; |
38 void DidNavigateMainFrame( | 38 void DidNavigateMainFrame( |
39 const LoadCommittedDetails& details, | 39 const LoadCommittedDetails& details, |
40 const FrameNavigateParams& params) override; | 40 const FrameNavigateParams& params) override; |
41 | 41 |
42 void OnPluginContentOriginAllowed(const GURL& content_origin); | 42 void OnPluginContentOriginAllowed(const url::Origin& content_origin); |
43 | 43 |
44 std::set<GURL> whitelist_; | 44 std::set<url::Origin> whitelist_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(PluginContentOriginWhitelist); | 46 DISALLOW_COPY_AND_ASSIGN(PluginContentOriginWhitelist); |
47 }; | 47 }; |
48 | 48 |
49 } // namespace content | 49 } // namespace content |
50 | 50 |
51 #endif // CONTENT_BROWSER_PLUGIN_CONTENT_ORIGIN_WHITELIST_H_ | 51 #endif // CONTENT_BROWSER_PLUGIN_CONTENT_ORIGIN_WHITELIST_H_ |
OLD | NEW |