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

Side by Side Diff: chrome/renderer/plugins/power_saver_info.h

Issue 2143073002: Plugin Power Saver: Improve blocked tiny plugins behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename a variable again Created 4 years, 5 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 CHROME_RENDERER_PLUGINS_POWER_SAVER_INFO_H_ 5 #ifndef CHROME_RENDERER_PLUGINS_POWER_SAVER_INFO_H_
6 #define CHROME_RENDERER_PLUGINS_POWER_SAVER_INFO_H_ 6 #define CHROME_RENDERER_PLUGINS_POWER_SAVER_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
(...skipping 13 matching lines...) Expand all
24 struct PowerSaverInfo { 24 struct PowerSaverInfo {
25 PowerSaverInfo(); 25 PowerSaverInfo();
26 PowerSaverInfo(const PowerSaverInfo& other); 26 PowerSaverInfo(const PowerSaverInfo& other);
27 27
28 // Determines the PowerSaverInfo using the peripheral content heuristic. 28 // Determines the PowerSaverInfo using the peripheral content heuristic.
29 static PowerSaverInfo Get(content::RenderFrame* render_frame, 29 static PowerSaverInfo Get(content::RenderFrame* render_frame,
30 bool power_saver_setting_on, 30 bool power_saver_setting_on,
31 const blink::WebPluginParams& params, 31 const blink::WebPluginParams& params,
32 const content::WebPluginInfo& plugin_info, 32 const content::WebPluginInfo& plugin_info,
33 const GURL& document_url); 33 const GURL& document_url);
34 // Whether this plugin is eligible for power saver.
35 bool is_eligible;
36 34
37 // Whether power saver should be enabled. 35 // Whether power saver should be enabled.
38 bool power_saver_enabled; 36 bool power_saver_enabled;
39 37
40 // Whether the plugin should be deferred because it is in a background tab. 38 // Whether the plugin should be deferred because it is in a background tab.
41 bool blocked_for_background_tab; 39 bool blocked_for_background_tab;
42 40
43 // The poster image specified in image 'srcset' attribute format. 41 // The poster image specified in image 'srcset' attribute format.
44 std::string poster_attribute; 42 std::string poster_attribute;
45 43
46 // Used to resolve relative paths in |poster_attribute|. 44 // Used to resolve relative paths in |poster_attribute|.
47 GURL base_url; 45 GURL base_url;
48 46
49 // Specify this to provide partially obscured plugins a centered poster image. 47 // Specify this to provide partially obscured plugins a centered poster image.
50 gfx::Size custom_poster_size; 48 gfx::Size custom_poster_size;
51 }; 49 };
52 50
53 #endif // CHROME_RENDERER_PLUGINS_POWER_SAVER_INFO_H_ 51 #endif // CHROME_RENDERER_PLUGINS_POWER_SAVER_INFO_H_
OLDNEW
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | chrome/renderer/plugins/power_saver_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698