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

Issue 952473002: Add frameId to executeScript/insertCSS (Closed)

Created:
5 years, 10 months ago by robwu
Modified:
5 years ago
CC:
aboxhall+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, davemoore+watch_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, extensions-reviews_chromium.org, je_julie(Not used), nektar+watch_chromium.org, oshima+watch_chromium.org, plundblad+watch_chromium.org, stevenjb+watch_chromium.org, yuzo+watch_chromium.org, Charlie Reis, dmazzoni, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add frameId to executeScript/insertCSS Depends on https://codereview.chromium.org/945743003/ for the updated error message in the unit tests. BUG=63979

Patch Set 1 #

Patch Set 2 : Add insertCSS tests #

Patch Set 3 : Revert change to error message, moved to https://codereview.chromium.org/945743003/ #

Total comments: 35

Patch Set 4 : Fix a few nits (review up to comment 16) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+503 lines, -16 lines) Patch
M chrome/browser/chromeos/accessibility/accessibility_manager.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.cc View 1 2 3 6 chunks +30 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_constants.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_constants.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/execute_script_apitest.cc View 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/executescript/frame_id/frame.html View 1 chunk +8 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/executescript/frame_id/frames.html View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/executescript/frame_id/manifest.json View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/executescript/frame_id/nested.html View 1 chunk +2 lines, -2 lines 0 comments Download
A chrome/test/data/extensions/api_test/executescript/frame_id/test.js View 1 2 3 1 chunk +378 lines, -0 lines 0 comments Download
M extensions/browser/api/execute_code_function.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M extensions/browser/script_executor.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M extensions/browser/script_executor.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M extensions/common/api/extension_types.json View 1 chunk +11 lines, -1 line 0 comments Download
M extensions/common/extension_messages.h View 1 chunk +6 lines, -1 line 0 comments Download
M extensions/renderer/script_injection_manager.cc View 1 2 3 3 chunks +29 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (3 generated)
robwu
kalman: PTAL at every file. jam: chrome/browser/chromeos/accessibility/accessibility_manager.cc dcheng: extensions/common/extension_messages.h
5 years, 10 months ago (2015-02-23 15:09:55 UTC) #2
dcheng
Is there a particular reason the about: URL error handling needs to be included in ...
5 years, 10 months ago (2015-02-23 15:29:06 UTC) #3
robwu
On 2015/02/23 15:29:06, dcheng wrote: > Is there a particular reason the about: URL error ...
5 years, 10 months ago (2015-02-23 15:39:15 UTC) #4
dcheng
On 2015/02/23 at 15:39:15, rob wrote: > On 2015/02/23 15:29:06, dcheng wrote: > > Is ...
5 years, 10 months ago (2015-02-23 15:56:45 UTC) #5
dcheng
+creis if he has any thoughts. https://codereview.chromium.org/952473002/diff/40001/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/952473002/diff/40001/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode1762 chrome/browser/extensions/api/tabs/tabs_api.cc:1762: int frame_id = ...
5 years, 10 months ago (2015-02-23 16:16:01 UTC) #6
not at google - send to devlin
Responding to a comment I noticed. Haven't reviewed the whole change. https://codereview.chromium.org/952473002/diff/40001/extensions/renderer/script_injection_manager.cc File extensions/renderer/script_injection_manager.cc (right): ...
5 years, 10 months ago (2015-02-23 16:50:17 UTC) #7
jam
On 2015/02/23 15:09:55, robwu wrote: > kalman: PTAL at every file. > > jam: chrome/browser/chromeos/accessibility/accessibility_manager.cc ...
5 years, 10 months ago (2015-02-23 16:52:24 UTC) #8
dcheng
https://codereview.chromium.org/952473002/diff/40001/extensions/renderer/script_injection_manager.cc File extensions/renderer/script_injection_manager.cc (right): https://codereview.chromium.org/952473002/diff/40001/extensions/renderer/script_injection_manager.cc#newcode79 extensions/renderer/script_injection_manager.cc:79: frame = frame->nextSibling()) { On 2015/02/23 16:50:17, kalman wrote: ...
5 years, 10 months ago (2015-02-23 16:56:42 UTC) #9
robwu
https://codereview.chromium.org/952473002/diff/40001/extensions/renderer/script_injection_manager.cc File extensions/renderer/script_injection_manager.cc (right): https://codereview.chromium.org/952473002/diff/40001/extensions/renderer/script_injection_manager.cc#newcode79 extensions/renderer/script_injection_manager.cc:79: frame = frame->nextSibling()) { On 2015/02/23 16:56:42, dcheng wrote: ...
5 years, 10 months ago (2015-02-23 17:13:40 UTC) #10
dcheng
On 2015/02/23 at 17:13:40, rob wrote: > https://codereview.chromium.org/952473002/diff/40001/extensions/renderer/script_injection_manager.cc > File extensions/renderer/script_injection_manager.cc (right): > > https://codereview.chromium.org/952473002/diff/40001/extensions/renderer/script_injection_manager.cc#newcode79 ...
5 years, 10 months ago (2015-02-23 17:25:23 UTC) #11
robwu
https://codereview.chromium.org/952473002/diff/40001/extensions/renderer/script_injection_manager.cc File extensions/renderer/script_injection_manager.cc (right): https://codereview.chromium.org/952473002/diff/40001/extensions/renderer/script_injection_manager.cc#newcode79 extensions/renderer/script_injection_manager.cc:79: frame = frame->nextSibling()) { On 2015/02/23 17:25:23, dcheng wrote: ...
5 years, 10 months ago (2015-02-23 17:44:36 UTC) #12
nasko
Few comments. https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/extension_types.json File extensions/common/api/extension_types.json (right): https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/extension_types.json#newcode46 extensions/common/api/extension_types.json:46: "description": "The <a href='webNavigation#frame_ids'>frame</a> where the script ...
5 years, 10 months ago (2015-02-23 18:39:02 UTC) #14
robwu
https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/extension_types.json File extensions/common/api/extension_types.json (right): https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/extension_types.json#newcode46 extensions/common/api/extension_types.json:46: "description": "The <a href='webNavigation#frame_ids'>frame</a> where the script or CSS ...
5 years, 10 months ago (2015-02-23 18:59:53 UTC) #15
not at google - send to devlin
https://codereview.chromium.org/952473002/diff/40001/chrome/browser/chromeos/accessibility/accessibility_manager.cc File chrome/browser/chromeos/accessibility/accessibility_manager.cc (right): https://codereview.chromium.org/952473002/diff/40001/chrome/browser/chromeos/accessibility/accessibility_manager.cc#newcode143 chrome/browser/chromeos/accessibility/accessibility_manager.cc:143: params.frame_id = 0; Hm, would be good to use ...
5 years, 10 months ago (2015-02-23 20:41:24 UTC) #16
robwu
https://codereview.chromium.org/952473002/diff/40001/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/952473002/diff/40001/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode1762 chrome/browser/extensions/api/tabs/tabs_api.cc:1762: int frame_id = details_->frame_id.get() ? *details_->frame_id : 0; On ...
5 years, 10 months ago (2015-02-23 21:54:06 UTC) #17
not at google - send to devlin
https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/extension_types.json File extensions/common/api/extension_types.json (right): https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/extension_types.json#newcode46 extensions/common/api/extension_types.json:46: "description": "The <a href='webNavigation#frame_ids'>frame</a> where the script or CSS ...
5 years, 10 months ago (2015-02-23 22:04:15 UTC) #18
Charlie Reis
There's a lot being discussed here, so I'm trying to catch up. I haven't reviewed ...
5 years, 10 months ago (2015-02-23 22:53:58 UTC) #20
dmazzoni
On Mon, Feb 23, 2015 at 2:53 PM, <creis@chromium.org> wrote: > 2) How are frame ...
5 years, 10 months ago (2015-02-24 16:56:28 UTC) #21
robwu
On 2015/02/24 16:56:28, dmazzoni wrote: > On Mon, Feb 23, 2015 at 2:53 PM, <mailto:creis@chromium.org> ...
5 years, 10 months ago (2015-02-24 21:44:06 UTC) #22
dcheng
https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/extension_types.json File extensions/common/api/extension_types.json (right): https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/extension_types.json#newcode46 extensions/common/api/extension_types.json:46: "description": "The <a href='webNavigation#frame_ids'>frame</a> where the script or CSS ...
5 years, 10 months ago (2015-02-24 21:54:28 UTC) #23
robwu
5 years, 10 months ago (2015-02-24 22:00:18 UTC) #24
On 2015/02/24 21:54:28, dcheng wrote:
>
https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/ex...
> File extensions/common/api/extension_types.json (right):
> 
>
https://codereview.chromium.org/952473002/diff/40001/extensions/common/api/ex...
> extensions/common/api/extension_types.json:46: "description": "The <a
> href='webNavigation#frame_ids'>frame</a> where the script or CSS should be
> injected."
> On 2015/02/23 20:41:24, kalman wrote:
> > On 2015/02/23 18:59:52, robwu wrote:
> > > On 2015/02/23 18:39:02, nasko wrote:
> > > > A frame id on its own is not unique and cannot fully qualify a frame. It
> > > should
> > > > be a pair of process id and frame id.
> > > 
> > > Within a tab, frameIds are supposed to be unique.
> > > The fact that this is not always the case (e.g. with OOPIF) is a bug:
> > > https://crbug.com/432875.
> > 
> > Worst case we can have our own (process id, frame id) --> (extension frame
id)
> > mapping for all classes, but it would be nice not to. Requiring both process
> and
> > frame IDs for all these APIs would be a PITA, like Rob says.
> > 
> > In other circumstances I'd include "frame IDs are unique within tabs" in the
> > description, but it sounds like that's not the case.
> 
> We already have an API (WebNavigation) that uses (processId, frameId). What's
> the plan for that then? Or is web navigation just going to be the odd one out?

processId will be ignored in the future, since tabId + frameId are unique. This
will be done by marking processId as an optional parameter (removing it could
break extensions that specify processId). (assuming that you're talking about
this one: https://developer.chrome.com/extensions/webNavigation#method-getFrame)

Powered by Google App Engine
This is Rietveld 408576698