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

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

Issue 1024493004: Plugin Power Saver: Record PPS UMAs only for users with PPS enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 virtual void OnKeyframeExtracted(const SkBitmap* bitmap) {} 57 virtual void OnKeyframeExtracted(const SkBitmap* bitmap) {}
58 58
59 virtual void OnThrottleStateChange() {} 59 virtual void OnThrottleStateChange() {}
60 60
61 // Called when the plugin should be hidden due to a placeholder. 61 // Called when the plugin should be hidden due to a placeholder.
62 virtual void OnHiddenForPlaceholder(bool hidden) {} 62 virtual void OnHiddenForPlaceholder(bool hidden) {}
63 63
64 virtual void OnThrottlerDestroyed() {} 64 virtual void OnThrottlerDestroyed() {}
65 }; 65 };
66 66
67 static scoped_ptr<PluginInstanceThrottler> Create(bool power_saver_enabled); 67 static scoped_ptr<PluginInstanceThrottler> Create();
68 68
69 static void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method); 69 static void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method);
70 70
71 virtual ~PluginInstanceThrottler() {} 71 virtual ~PluginInstanceThrottler() {}
72 72
73 virtual void AddObserver(Observer* observer) = 0; 73 virtual void AddObserver(Observer* observer) = 0;
74 virtual void RemoveObserver(Observer* observer) = 0; 74 virtual void RemoveObserver(Observer* observer) = 0;
75 75
76 virtual bool IsThrottled() const = 0; 76 virtual bool IsThrottled() const = 0;
77 virtual bool IsHiddenForPlaceholder() const = 0; 77 virtual bool IsHiddenForPlaceholder() const = 0;
(...skipping 12 matching lines...) Expand all
90 90
91 protected: 91 protected:
92 PluginInstanceThrottler() {} 92 PluginInstanceThrottler() {}
93 93
94 private: 94 private:
95 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler); 95 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler);
96 }; 96 };
97 } 97 }
98 98
99 #endif // CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_ 99 #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