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

Side by Side Diff: components/plugins/renderer/loadable_plugin_placeholder.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: merge. and change to enum 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 COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ 5 #ifndef COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_
6 #define COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ 6 #define COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void ReplacePlugin(blink::WebPlugin* new_plugin); 75 void ReplacePlugin(blink::WebPlugin* new_plugin);
76 76
77 // Load the blocked plugin. 77 // Load the blocked plugin.
78 void LoadPlugin(); 78 void LoadPlugin();
79 79
80 // Javascript callbacks: 80 // Javascript callbacks:
81 void LoadCallback(); 81 void LoadCallback();
82 void DidFinishLoadingCallback(); 82 void DidFinishLoadingCallback();
83 void DidFinishIconRepositionForTestingCallback(); 83 void DidFinishIconRepositionForTestingCallback();
84 84
85 // True if the power saver heuristic has already been run on this content.
86 bool heuristic_run_before_;
87
85 private: 88 private:
86 // WebViewPlugin::Delegate methods: 89 // WebViewPlugin::Delegate methods:
87 void PluginDestroyed() override; 90 void PluginDestroyed() override;
88 v8::Local<v8::Object> GetV8ScriptableObject( 91 v8::Local<v8::Object> GetV8ScriptableObject(
89 v8::Isolate* isolate) const override; 92 v8::Isolate* isolate) const override;
90 void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override; 93 void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override;
91 94
92 // RenderFrameObserver methods: 95 // RenderFrameObserver methods:
93 void WasShown() override; 96 void WasShown() override;
94 97
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // When we load, uses this premade plugin instead of creating a new one. 131 // When we load, uses this premade plugin instead of creating a new one.
129 content::PluginInstanceThrottler* premade_throttler_; 132 content::PluginInstanceThrottler* premade_throttler_;
130 133
131 bool allow_loading_; 134 bool allow_loading_;
132 135
133 bool finished_loading_; 136 bool finished_loading_;
134 std::string identifier_; 137 std::string identifier_;
135 138
136 gfx::Rect unobscured_rect_; 139 gfx::Rect unobscured_rect_;
137 140
138 // True if the power saver heuristic has already been run on this content.
139 bool heuristic_run_before_;
140
141 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; 141 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); 143 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder);
144 }; 144 };
145 145
146 } // namespace plugins 146 } // namespace plugins
147 147
148 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ 148 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/plugins/power_saver_info.cc ('k') | components/plugins/renderer/loadable_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698