| 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_RENDERER_PEPPER_PLUGIN_POWER_SAVER_HELPER_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_POWER_SAVER_HELPER_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_POWER_SAVER_HELPER_H_ | 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_POWER_SAVER_HELPER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 const base::Closure& unthrottle_callback); | 44 const base::Closure& unthrottle_callback); |
| 45 RenderFrame::PeripheralContentStatus GetPeripheralContentStatus( | 45 RenderFrame::PeripheralContentStatus GetPeripheralContentStatus( |
| 46 const url::Origin& main_frame_origin, | 46 const url::Origin& main_frame_origin, |
| 47 const url::Origin& content_origin, | 47 const url::Origin& content_origin, |
| 48 const gfx::Size& unobscured_size, | 48 const gfx::Size& unobscured_size, |
| 49 RenderFrame::RecordPeripheralDecision record_decision) const; | 49 RenderFrame::RecordPeripheralDecision record_decision) const; |
| 50 void WhitelistContentOrigin(const url::Origin& content_origin); | 50 void WhitelistContentOrigin(const url::Origin& content_origin); |
| 51 | 51 |
| 52 // RenderFrameObserver implementation. | 52 // RenderFrameObserver implementation. |
| 53 void DidCommitProvisionalLoad(bool is_new_navigation, | 53 void DidCommitProvisionalLoad(bool is_new_navigation, |
| 54 bool is_same_page_navigation) override; | 54 bool is_same_document_navigation) override; |
| 55 bool OnMessageReceived(const IPC::Message& message) override; | 55 bool OnMessageReceived(const IPC::Message& message) override; |
| 56 void OnDestruct() override; | 56 void OnDestruct() override; |
| 57 | 57 |
| 58 void OnUpdatePluginContentOriginWhitelist( | 58 void OnUpdatePluginContentOriginWhitelist( |
| 59 const std::set<url::Origin>& origin_whitelist); | 59 const std::set<url::Origin>& origin_whitelist); |
| 60 | 60 |
| 61 // Local copy of the whitelist for the entire tab. | 61 // Local copy of the whitelist for the entire tab. |
| 62 std::set<url::Origin> origin_whitelist_; | 62 std::set<url::Origin> origin_whitelist_; |
| 63 | 63 |
| 64 // Set of peripheral plugins eligible to be unthrottled ex post facto. | 64 // Set of peripheral plugins eligible to be unthrottled ex post facto. |
| 65 std::vector<PeripheralPlugin> peripheral_plugins_; | 65 std::vector<PeripheralPlugin> peripheral_plugins_; |
| 66 | 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(PluginPowerSaverHelper); | 67 DISALLOW_COPY_AND_ASSIGN(PluginPowerSaverHelper); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace content | 70 } // namespace content |
| 71 | 71 |
| 72 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_POWER_SAVER_HELPER_H_ | 72 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_POWER_SAVER_HELPER_H_ |
| OLD | NEW |