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

Side by Side Diff: content/public/renderer/render_frame.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_RENDER_FRAME_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Content is essential because there's large content from the same origin. 75 // Content is essential because there's large content from the same origin.
76 CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED = 3, 76 CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED = 3,
77 // Content is essential because it's tiny in size. 77 // Content is essential because it's tiny in size.
78 CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_TINY = 4, 78 CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_TINY = 4,
79 // Content is essential because it has an unknown size. 79 // Content is essential because it has an unknown size.
80 CONTENT_STATUS_ESSENTIAL_UNKNOWN_SIZE = 5, 80 CONTENT_STATUS_ESSENTIAL_UNKNOWN_SIZE = 5,
81 // Must be last. 81 // Must be last.
82 CONTENT_STATUS_NUM_ITEMS 82 CONTENT_STATUS_NUM_ITEMS
83 }; 83 };
84 84
85 enum RecordPeripheralDecision {
86 DONT_RECORD_DECISION = 0,
87 RECORD_DECISION = 1
88 };
89
85 // Returns the RenderFrame given a WebFrame. 90 // Returns the RenderFrame given a WebFrame.
86 static RenderFrame* FromWebFrame(blink::WebFrame* web_frame); 91 static RenderFrame* FromWebFrame(blink::WebFrame* web_frame);
87 92
88 // Returns the RenderFrame given a routing id. 93 // Returns the RenderFrame given a routing id.
89 static RenderFrame* FromRoutingID(int routing_id); 94 static RenderFrame* FromRoutingID(int routing_id);
90 95
91 // Returns the RenderView associated with this frame. 96 // Returns the RenderView associated with this frame.
92 virtual RenderView* GetRenderView() = 0; 97 virtual RenderView* GetRenderView() = 0;
93 98
94 // Return the RenderAccessibility associated with this frame. 99 // Return the RenderAccessibility associated with this frame.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // - Same-origin: a.com -> b.com/iframe-to-a.html -> a.com/plugin.swf 175 // - Same-origin: a.com -> b.com/iframe-to-a.html -> a.com/plugin.swf
171 // 176 //
172 // |main_frame_origin| is the origin of the main frame. 177 // |main_frame_origin| is the origin of the main frame.
173 // 178 //
174 // |content_origin| is the origin of the plugin content. 179 // |content_origin| is the origin of the plugin content.
175 // 180 //
176 // |unobscured_size| are zoom and device scale independent logical pixels. 181 // |unobscured_size| are zoom and device scale independent logical pixels.
177 virtual PeripheralContentStatus GetPeripheralContentStatus( 182 virtual PeripheralContentStatus GetPeripheralContentStatus(
178 const url::Origin& main_frame_origin, 183 const url::Origin& main_frame_origin,
179 const url::Origin& content_origin, 184 const url::Origin& content_origin,
180 const gfx::Size& unobscured_size) const = 0; 185 const gfx::Size& unobscured_size,
186 RecordPeripheralDecision record_decision) const = 0;
181 187
182 // Whitelists a |content_origin| so its content will never be throttled in 188 // Whitelists a |content_origin| so its content will never be throttled in
183 // this RenderFrame. Whitelist is cleared by top level navigation. 189 // this RenderFrame. Whitelist is cleared by top level navigation.
184 virtual void WhitelistContentOrigin(const url::Origin& content_origin) = 0; 190 virtual void WhitelistContentOrigin(const url::Origin& content_origin) = 0;
185 #endif 191 #endif
186 192
187 // Returns true if this frame is a FTP directory listing. 193 // Returns true if this frame is a FTP directory listing.
188 virtual bool IsFTPDirectoryListing() = 0; 194 virtual bool IsFTPDirectoryListing() = 0;
189 195
190 // Attaches the browser plugin identified by |element_instance_id| to guest 196 // Attaches the browser plugin identified by |element_instance_id| to guest
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 229
224 private: 230 private:
225 // This interface should only be implemented inside content. 231 // This interface should only be implemented inside content.
226 friend class RenderFrameImpl; 232 friend class RenderFrameImpl;
227 RenderFrame() {} 233 RenderFrame() {}
228 }; 234 };
229 235
230 } // namespace content 236 } // namespace content
231 237
232 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ 238 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
OLDNEW
« no previous file with comments | « content/public/renderer/plugin_instance_throttler.h ('k') | content/renderer/pepper/pepper_webplugin_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698