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

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

Issue 879403002: Plugin Power Saver: Mute throttled plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove hack used for testing. 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
« no previous file with comments | « no previous file | content/renderer/pepper/plugin_instance_throttler_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 virtual bool IsHiddenForPlaceholder() const = 0; 77 virtual bool IsHiddenForPlaceholder() const = 0;
78 78
79 // Marks the plugin as essential. Unthrottles the plugin if already throttled. 79 // Marks the plugin as essential. Unthrottles the plugin if already throttled.
80 virtual void MarkPluginEssential(PowerSaverUnthrottleMethod method) = 0; 80 virtual void MarkPluginEssential(PowerSaverUnthrottleMethod method) = 0;
81 81
82 // Called by the placeholder when the plugin should temporarily be hidden. 82 // Called by the placeholder when the plugin should temporarily be hidden.
83 virtual void SetHiddenForPlaceholder(bool hidden) = 0; 83 virtual void SetHiddenForPlaceholder(bool hidden) = 0;
84 84
85 virtual blink::WebPlugin* GetWebPlugin() const = 0; 85 virtual blink::WebPlugin* GetWebPlugin() const = 0;
86 86
87 // Throttler needs to know when the plugin audio is throttled, as this may
88 // prevent the plugin from generating new frames.
89 virtual void NotifyAudioThrottled() = 0;
90
87 protected: 91 protected:
88 PluginInstanceThrottler() {} 92 PluginInstanceThrottler() {}
89 93
90 private: 94 private:
91 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler); 95 DISALLOW_COPY_AND_ASSIGN(PluginInstanceThrottler);
92 }; 96 };
93 } 97 }
94 98
95 #endif // CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_ 99 #endif // CONTENT_PUBLIC_RENDERER_PLUGIN_INSTANCE_THROTTLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/plugin_instance_throttler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698