| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. 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. | |
| 4 | |
| 5 #include "content/public/renderer/plugin_instance_throttler.h" | |
| 6 | |
| 7 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" | |
| 8 | |
| 9 namespace content { | |
| 10 | |
| 11 // static | |
| 12 scoped_ptr<PluginInstanceThrottler> PluginInstanceThrottler::Get( | |
| 13 RenderFrame* frame, | |
| 14 const GURL& plugin_url, | |
| 15 PluginPowerSaverMode power_saver_mode) { | |
| 16 if (power_saver_mode == PluginPowerSaverMode::POWER_SAVER_MODE_ESSENTIAL) | |
| 17 return nullptr; | |
| 18 | |
| 19 bool power_saver_enabled = | |
| 20 power_saver_mode == | |
| 21 PluginPowerSaverMode::POWER_SAVER_MODE_PERIPHERAL_THROTTLED; | |
| 22 return make_scoped_ptr( | |
| 23 new PluginInstanceThrottlerImpl(frame, plugin_url, power_saver_enabled)); | |
| 24 } | |
| 25 | |
| 26 } // namespace content | |
| OLD | NEW |