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

Issue 669703003: Plugin Power Saver: Restrict Power Saver to cross-origin. (Closed)

Created:
6 years, 2 months ago by tommycli
Modified:
6 years, 2 months ago
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, Lei Zhang, groby-ooo-7-16, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Plugin Power Saver: Restrict Power Saver to cross-origin. Design doc: http://goo.gl/iDix3p BUG=403800 Committed: https://crrev.com/55196a2b4a303ddbc46f2b63b58c725f80710c9c Cr-Commit-Position: refs/heads/master@{#300998}

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : much simplify #

Patch Set 4 : #

Total comments: 13

Patch Set 5 : add comments #

Total comments: 5

Patch Set 6 : Add path for remote top level frames. #

Total comments: 9

Patch Set 7 : #

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -7 lines) Patch
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +24 lines, -7 lines 0 comments Download

Messages

Total messages: 45 (9 generated)
tommycli
raymes, jamesr: PTAL. This limits the experimental Power Saver to operate on cross-site plugins only.
6 years, 2 months ago (2014-10-22 23:42:26 UTC) #2
tommycli
+cc thestig, groby
6 years, 2 months ago (2014-10-22 23:43:01 UTC) #3
jamesr
I don't know what this is, removing myself from reviewer list.
6 years, 2 months ago (2014-10-22 23:46:03 UTC) #5
tommycli
jamesr: Thanks for the quick response. This feature is meant to reduce peripheral plugin power ...
6 years, 2 months ago (2014-10-22 23:52:04 UTC) #7
jamesr
Anybody who's familiar with this area and is a content/ owner
6 years, 2 months ago (2014-10-22 23:56:05 UTC) #9
tommycli
piman: Do you mind taking a look at content/renderer/render_frame_impl.cc ? Thanks!
6 years, 2 months ago (2014-10-23 00:00:28 UTC) #11
groby-ooo-7-16
https://codereview.chromium.org/669703003/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode590 content/renderer/pepper/pepper_plugin_instance_impl.cc:590: // is peripheral here. I think now would be ...
6 years, 2 months ago (2014-10-23 00:17:22 UTC) #13
raymes
I don't think you need to do as much plumbing for this. container()->element().document() should be ...
6 years, 2 months ago (2014-10-23 00:20:34 UTC) #14
raymes
https://codereview.chromium.org/669703003/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode590 content/renderer/pepper/pepper_plugin_instance_impl.cc:590: // is peripheral here. Yes, please pull all this ...
6 years, 2 months ago (2014-10-23 00:21:29 UTC) #15
tommycli
groby/raymes: thanks guys, much simplified now https://codereview.chromium.org/669703003/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode590 content/renderer/pepper/pepper_plugin_instance_impl.cc:590: // is peripheral ...
6 years, 2 months ago (2014-10-23 00:46:12 UTC) #17
groby-ooo-7-16
Awesome - much better, so simplify! - http://memegenerator.net/instance/45468865 https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3302 content/renderer/pepper/pepper_plugin_instance_impl.cc:3302: GURL ...
6 years, 2 months ago (2014-10-23 00:53:45 UTC) #18
raymes
https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3302 content/renderer/pepper/pepper_plugin_instance_impl.cc:3302: GURL top_frame_url = render_frame_->GetWebFrame()->top()->document().url(); Are you sure you want ...
6 years, 2 months ago (2014-10-23 01:34:07 UTC) #19
groby-ooo-7-16
https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3302 content/renderer/pepper/pepper_plugin_instance_impl.cc:3302: GURL top_frame_url = render_frame_->GetWebFrame()->top()->document().url(); On 2014/10/23 01:34:07, raymes wrote: ...
6 years, 2 months ago (2014-10-23 01:59:14 UTC) #20
raymes
https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3302 content/renderer/pepper/pepper_plugin_instance_impl.cc:3302: GURL top_frame_url = render_frame_->GetWebFrame()->top()->document().url(); I was thinking about a ...
6 years, 2 months ago (2014-10-23 03:53:38 UTC) #21
piman
https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3302 content/renderer/pepper/pepper_plugin_instance_impl.cc:3302: GURL top_frame_url = render_frame_->GetWebFrame()->top()->document().url(); If we're in an out-of-process ...
6 years, 2 months ago (2014-10-23 03:56:32 UTC) #23
groby-ooo-7-16
https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3302 content/renderer/pepper/pepper_plugin_instance_impl.cc:3302: GURL top_frame_url = render_frame_->GetWebFrame()->top()->document().url(); On 2014/10/23 03:53:38, raymes wrote: ...
6 years, 2 months ago (2014-10-23 05:51:19 UTC) #24
piman
On Wed, Oct 22, 2014 at 10:51 PM, <groby@chromium.org> wrote: > > https://codereview.chromium.org/669703003/diff/60001/ > content/renderer/pepper/pepper_plugin_instance_impl.cc ...
6 years, 2 months ago (2014-10-23 17:13:19 UTC) #25
tommycli
https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3302 content/renderer/pepper/pepper_plugin_instance_impl.cc:3302: GURL top_frame_url = render_frame_->GetWebFrame()->top()->document().url(); On 2014/10/23 05:51:19, groby wrote: ...
6 years, 2 months ago (2014-10-23 17:23:27 UTC) #26
Charlie Reis
[+site-isolation-reviews to CC] Thanks for noticing that, piman@! A few thoughts on the OOPIF case ...
6 years, 2 months ago (2014-10-23 18:23:27 UTC) #27
tommycli
https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/60001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3302 content/renderer/pepper/pepper_plugin_instance_impl.cc:3302: GURL top_frame_url = render_frame_->GetWebFrame()->top()->document().url(); On 2014/10/23 18:23:27, Charlie Reis ...
6 years, 2 months ago (2014-10-23 19:32:23 UTC) #28
Charlie Reis
Thanks! That's much clearer. We can probably use Alex's WebFrame::securityContext to fix this for RemoteFrames. ...
6 years, 2 months ago (2014-10-23 19:51:08 UTC) #29
groby-ooo-7-16
https://codereview.chromium.org/669703003/diff/80001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/80001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3303 content/renderer/pepper/pepper_plugin_instance_impl.cc:3303: // content's origin differs from the top level frame's ...
6 years, 2 months ago (2014-10-23 20:00:45 UTC) #30
tommycli
https://codereview.chromium.org/669703003/diff/80001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/80001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3307 content/renderer/pepper/pepper_plugin_instance_impl.cc:3307: GURL top_frame_url = render_frame_->GetWebFrame()->top()->document().url(); On 2014/10/23 19:51:08, Charlie Reis ...
6 years, 2 months ago (2014-10-23 20:51:29 UTC) #31
piman
https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3314 content/renderer/pepper/pepper_plugin_instance_impl.cc:3314: GURL top_frame_url = render_frame_->GetWebFrame()->top()->document().url(); Can you save the result ...
6 years, 2 months ago (2014-10-23 21:07:35 UTC) #32
raymes
https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3311 content/renderer/pepper/pepper_plugin_instance_impl.cc:3311: if (render_frame_->GetWebFrame()->top()->isWebRemoteFrame()) creis@: As an aside, we have lots ...
6 years, 2 months ago (2014-10-23 21:09:03 UTC) #33
Charlie Reis
https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3311 content/renderer/pepper/pepper_plugin_instance_impl.cc:3311: if (render_frame_->GetWebFrame()->top()->isWebRemoteFrame()) On 2014/10/23 21:09:03, raymes wrote: > creis@: ...
6 years, 2 months ago (2014-10-23 21:51:33 UTC) #34
tommycli
raymes/piman/creis: Thanks for the review. Comments below. https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3311 content/renderer/pepper/pepper_plugin_instance_impl.cc:3311: if (render_frame_->GetWebFrame()->top()->isWebRemoteFrame()) ...
6 years, 2 months ago (2014-10-23 22:21:09 UTC) #35
raymes
The concept of a render frame never used to exist so that would be my ...
6 years, 2 months ago (2014-10-23 22:31:01 UTC) #36
raymes
lgtm https://codereview.chromium.org/669703003/diff/140001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/140001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3311 content/renderer/pepper/pepper_plugin_instance_impl.cc:3311: WebFrame* top_frame = render_frame_->GetWebFrame()->view()->mainFrame(); nit: might as well ...
6 years, 2 months ago (2014-10-23 22:33:19 UTC) #37
piman
lgtm
6 years, 2 months ago (2014-10-23 22:38:26 UTC) #38
tommycli
thanks guys! https://codereview.chromium.org/669703003/diff/140001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/140001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3311 content/renderer/pepper/pepper_plugin_instance_impl.cc:3311: WebFrame* top_frame = render_frame_->GetWebFrame()->view()->mainFrame(); On 2014/10/23 22:33:19, ...
6 years, 2 months ago (2014-10-23 22:42:20 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/669703003/160001
6 years, 2 months ago (2014-10-23 23:01:16 UTC) #41
Charlie Reis
LGTM as well https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/669703003/diff/100001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode3311 content/renderer/pepper/pepper_plugin_instance_impl.cc:3311: if (render_frame_->GetWebFrame()->top()->isWebRemoteFrame()) On 2014/10/23 22:21:09, tommycli ...
6 years, 2 months ago (2014-10-23 23:50:44 UTC) #42
groby-ooo-7-16
I suppose I should technically say LGTM as well :)
6 years, 2 months ago (2014-10-23 23:55:07 UTC) #43
commit-bot: I haz the power
Committed patchset #9 (id:160001)
6 years, 2 months ago (2014-10-24 00:19:42 UTC) #44
commit-bot: I haz the power
6 years, 2 months ago (2014-10-24 00:20:31 UTC) #45
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/55196a2b4a303ddbc46f2b63b58c725f80710c9c
Cr-Commit-Position: refs/heads/master@{#300998}

Powered by Google App Engine
This is Rietveld 408576698