Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: content/public/renderer/plugin_instance_throttler.h

Issue 1114623002: Plugin Power Saver: Make PPS work well with prerendered pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_
6 #define CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_ 6 #define CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 UNTHROTTLE_METHOD_NUM_ITEMS 55 UNTHROTTLE_METHOD_NUM_ITEMS
56 }; 56 };
57 57
58 class Observer { 58 class Observer {
59 public: 59 public:
60 // Guaranteed to be called before the throttle is engaged. 60 // Guaranteed to be called before the throttle is engaged.
61 virtual void OnKeyframeExtracted(const SkBitmap* bitmap) {} 61 virtual void OnKeyframeExtracted(const SkBitmap* bitmap) {}
62 62
63 virtual void OnThrottleStateChange() {} 63 virtual void OnThrottleStateChange() {}
64 64
65 virtual void OnPeripheralStateChange() {}
66
65 // Called when the plugin should be hidden due to a placeholder. 67 // Called when the plugin should be hidden due to a placeholder.
66 virtual void OnHiddenForPlaceholder(bool hidden) {} 68 virtual void OnHiddenForPlaceholder(bool hidden) {}
67 69
68 virtual void OnThrottlerDestroyed() {} 70 virtual void OnThrottlerDestroyed() {}
69 }; 71 };
70 72
71 static scoped_ptr<PluginInstanceThrottler> Create(); 73 static scoped_ptr<PluginInstanceThrottler> Create();
72 74
73 static void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method); 75 static void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method);
74 76
(...skipping 22 matching lines...) Expand all
97 99
98 protected: 100 protected:
99 PluginInstanceThrottler() {} 101 PluginInstanceThrottler() {}
100 102
101 private: 103 private:
102 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler); 104 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler);
103 }; 105 };
104 } 106 }
105 107
106 #endif // CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_ 108 #endif // CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_
OLDNEW
« no previous file with comments | « components/plugins/renderer/loadable_plugin_placeholder.cc ('k') | content/renderer/pepper/plugin_instance_throttler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698