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

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

Issue 2208173002: Plugin Power Saver Tiny: Add Unthrottle by Omnibox bucket to histogram. (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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 public: 47 public:
48 // How the throttled power saver is unthrottled, if ever. 48 // How the throttled power saver is unthrottled, if ever.
49 // These numeric values are used in UMA logs; do not change them. 49 // These numeric values are used in UMA logs; do not change them.
50 enum PowerSaverUnthrottleMethod { 50 enum PowerSaverUnthrottleMethod {
51 UNTHROTTLE_METHOD_DO_NOT_RECORD = -1, // Sentinel value to skip recording. 51 UNTHROTTLE_METHOD_DO_NOT_RECORD = -1, // Sentinel value to skip recording.
52 UNTHROTTLE_METHOD_NEVER = 0, 52 UNTHROTTLE_METHOD_NEVER = 0,
53 UNTHROTTLE_METHOD_BY_CLICK = 1, 53 UNTHROTTLE_METHOD_BY_CLICK = 1,
54 UNTHROTTLE_METHOD_BY_WHITELIST = 2, 54 UNTHROTTLE_METHOD_BY_WHITELIST = 2,
55 UNTHROTTLE_METHOD_BY_AUDIO = 3, 55 UNTHROTTLE_METHOD_BY_AUDIO = 3,
56 UNTHROTTLE_METHOD_BY_SIZE_CHANGE = 4, 56 UNTHROTTLE_METHOD_BY_SIZE_CHANGE = 4,
57 UNTHROTTLE_METHOD_BY_OMNIBOX_ICON = 5,
57 UNTHROTTLE_METHOD_NUM_ITEMS 58 UNTHROTTLE_METHOD_NUM_ITEMS
58 }; 59 };
59 60
60 class Observer { 61 class Observer {
61 public: 62 public:
62 // Guaranteed to be called before the throttle is engaged. 63 // Guaranteed to be called before the throttle is engaged.
63 virtual void OnKeyframeExtracted(const SkBitmap* bitmap) {} 64 virtual void OnKeyframeExtracted(const SkBitmap* bitmap) {}
64 65
65 virtual void OnThrottleStateChange() {} 66 virtual void OnThrottleStateChange() {}
66 67
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 102
102 protected: 103 protected:
103 PluginInstanceThrottler() {} 104 PluginInstanceThrottler() {}
104 105
105 private: 106 private:
106 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler); 107 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler);
107 }; 108 };
108 } 109 }
109 110
110 #endif // CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_ 111 #endif // CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_
OLDNEW
« no previous file with comments | « components/plugins/renderer/loadable_plugin_placeholder.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698