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

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

Issue 1497623002: Plugin Power Saver: Improve Poster behavior for essential plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Plugin content is defined to be cross-origin when the plugin source's 139 // Plugin content is defined to be cross-origin when the plugin source's
140 // origin differs from the top level frame's origin. For example: 140 // origin differs from the top level frame's origin. For example:
141 // - Cross-origin: a.com -> b.com/plugin.swf 141 // - Cross-origin: a.com -> b.com/plugin.swf
142 // - Cross-origin: a.com -> b.com/iframe.html -> b.com/plugin.swf 142 // - Cross-origin: a.com -> b.com/iframe.html -> b.com/plugin.swf
143 // - Same-origin: a.com -> b.com/iframe-to-a.html -> a.com/plugin.swf 143 // - Same-origin: a.com -> b.com/iframe-to-a.html -> a.com/plugin.swf
144 // 144 //
145 // |main_frame_origin| is the origin of the main frame. 145 // |main_frame_origin| is the origin of the main frame.
146 // 146 //
147 // |content_origin| is the origin of the plugin content. 147 // |content_origin| is the origin of the plugin content.
148 // 148 //
149 // |width| and |height| are zoom and device scale independent logical pixels. 149 // |width| and |height| are zoom and device scale independent logical pixels.
groby-ooo-7-16 2015/12/04 22:06:56 Can we make this gfx::Size? And we probably want
tommycli 2015/12/07 22:06:18 Done. Yeah that's a good idea. That way I can use
groby-ooo-7-16 2015/12/07 22:16:04 Careful - it _might_ be we need to treat 0x0 plugi
tommycli 2015/12/07 22:22:13 Yeah this comment has gone away. Currently, 0x0 pl
150 // If they are negative, the sizing is ignored, and the method returns false
151 // if and only if the origin marks the content as essential.
150 // 152 //
151 // |cross_origin_main_content| may be NULL. It is set to true if the 153 // |cross_origin_main_content| may be NULL. It is set to true if the
152 // plugin content is cross-origin but still the "main attraction" of the page. 154 // plugin content is cross-origin but still the "main attraction" of the page.
153 virtual bool ShouldThrottleContent(const url::Origin& main_frame_origin, 155 virtual bool ShouldThrottleContent(const url::Origin& main_frame_origin,
154 const url::Origin& content_origin, 156 const url::Origin& content_origin,
155 int width, 157 int width,
156 int height, 158 int height,
157 bool* cross_origin_main_content) const = 0; 159 bool* cross_origin_main_content) const = 0;
158 160
159 // Whitelists a |content_origin| so its content will never be throttled in 161 // Whitelists a |content_origin| so its content will never be throttled in
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 196
195 private: 197 private:
196 // This interface should only be implemented inside content. 198 // This interface should only be implemented inside content.
197 friend class RenderFrameImpl; 199 friend class RenderFrameImpl;
198 RenderFrame() {} 200 RenderFrame() {}
199 }; 201 };
200 202
201 } // namespace content 203 } // namespace content
202 204
203 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ 205 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698