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

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

Issue 2211753002: Plugin Power Saver Tiny: Fix Plugin.PowerSaver.PeripheralHeuristic UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual void OnThrottleStateChange() {} 65 virtual void OnThrottleStateChange() {}
66 66
67 virtual void OnPeripheralStateChange() {} 67 virtual void OnPeripheralStateChange() {}
68 68
69 // Called when the plugin should be hidden due to a placeholder. 69 // Called when the plugin should be hidden due to a placeholder.
70 virtual void OnHiddenForPlaceholder(bool hidden) {} 70 virtual void OnHiddenForPlaceholder(bool hidden) {}
71 71
72 virtual void OnThrottlerDestroyed() {} 72 virtual void OnThrottlerDestroyed() {}
73 }; 73 };
74 74
75 static std::unique_ptr<PluginInstanceThrottler> Create(); 75 static std::unique_ptr<PluginInstanceThrottler> Create(bool record_decision);
76 76
77 static void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method); 77 static void RecordUnthrottleMethodMetric(PowerSaverUnthrottleMethod method);
78 78
79 virtual ~PluginInstanceThrottler() {} 79 virtual ~PluginInstanceThrottler() {}
80 80
81 virtual void AddObserver(Observer* observer) = 0; 81 virtual void AddObserver(Observer* observer) = 0;
82 virtual void RemoveObserver(Observer* observer) = 0; 82 virtual void RemoveObserver(Observer* observer) = 0;
83 83
84 virtual bool IsThrottled() const = 0; 84 virtual bool IsThrottled() const = 0;
85 virtual bool IsHiddenForPlaceholder() const = 0; 85 virtual bool IsHiddenForPlaceholder() const = 0;
(...skipping 15 matching lines...) Expand all
101 101
102 protected: 102 protected:
103 PluginInstanceThrottler() {} 103 PluginInstanceThrottler() {}
104 104
105 private: 105 private:
106 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler); 106 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler);
107 }; 107 };
108 } 108 }
109 109
110 #endif // CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_ 110 #endif // CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698