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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_THROTTLER_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_THROTTLER_H_
8 #include "base/callback_forward.h"
9 #include "base/macros.h"
13 // Throttles Pepper Plugin instances in Power Saver mode. Currently just a
14 // stub implementation that engages throttling after a fixed timeout.
15 // In the future, will examine plugin frames to find a suitable preview
16 // image before engaging throttling.
17 class PepperPluginInstanceThrottler {
19 // |throttle_closure| is called to engage throttling.
20 explicit PepperPluginInstanceThrottler(const base::Closure& throttle_closure);
22 virtual ~PepperPluginInstanceThrottler();
25 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceThrottler);
29 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_THROTTLER_H_