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

Issue 1239643004: extensions: tabs: set tab id to -1 for app/devtools windows (Closed)

Created:
5 years, 5 months ago by llandwerlin-old
Modified:
5 years, 5 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

extensions: tabs: set tab id to -1 for app/devtools windows Before making app & devtools windows visible through chrome.windows.* we want to make sure the tab id of the devtools is stripped from the tab object returned to javascript so devtools cannot be manipulated through the chrome.tabs.* API. BUG=394341 Committed: https://crrev.com/d2315f72405e4776861fa79919a0051538660656 Cr-Commit-Position: refs/heads/master@{#339647}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Filter in CreateTabValue() #

Patch Set 3 : Remove unused prototype #

Patch Set 4 : Change GetTabId() #

Patch Set 5 : Fix typo #

Patch Set 6 : Change schema to reflect tab id always present and may be set to -1 #

Patch Set 7 : Fix tab id access in desktopCapture API #

Patch Set 8 : Fix session api test #

Patch Set 9 : set tab id to -1 in session api #

Total comments: 2

Patch Set 10 : "may not be -1" -> "may be -1" #

Total comments: 8

Patch Set 11 : Support no tab id and NONE tab id #

Total comments: 9

Patch Set 12 : Add BrowserSupportsTabs #

Patch Set 13 : s/SupportsTab/SupportsTabs/ #

Patch Set 14 : Relax condition on GetTabId #

Patch Set 15 : git cl try #

Patch Set 16 : Add test chrome.tabs events #

Total comments: 8

Patch Set 17 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -7 lines) Patch
M chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_event_router.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +20 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_tab_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_tab_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/tabs.json View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -1 line 0 comments Download
A + chrome/test/data/extensions/api_test/tabs/no_events/background.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/tabs/no_events/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/extensions/api_test/tabs/no_events/test.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (8 generated)
llandwerlin-old
kalman@, dgozman@: Here is a different approach to filtering out devtools windows from the chrome.tabs ...
5 years, 5 months ago (2015-07-14 15:10:46 UTC) #2
dgozman
I like this approach as it should avoid hard-to-predict bugs around too specific devtools tab ...
5 years, 5 months ago (2015-07-14 15:16:16 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc File chrome/browser/extensions/extension_tab_util.cc (right): https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc#newcode357 chrome/browser/extensions/extension_tab_util.cc:357: if (browser->is_devtools()) On 2015/07/14 15:16:16, dgozman wrote: > What ...
5 years, 5 months ago (2015-07-14 17:15:14 UTC) #4
llandwerlin-old
On 2015/07/14 17:15:14, kalman wrote: > https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc > File chrome/browser/extensions/extension_tab_util.cc (right): > > https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc#newcode357 > ...
5 years, 5 months ago (2015-07-14 17:21:03 UTC) #5
not at google - send to devlin
https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc File chrome/browser/extensions/extension_tab_util.cc (right): https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc#newcode357 chrome/browser/extensions/extension_tab_util.cc:357: if (browser->is_devtools()) On 2015/07/14 17:15:13, kalman wrote: > On ...
5 years, 5 months ago (2015-07-14 17:40:00 UTC) #6
not at google - send to devlin
https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc File chrome/browser/extensions/extension_tab_util.cc (right): https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc#newcode357 chrome/browser/extensions/extension_tab_util.cc:357: if (browser->is_devtools()) On 2015/07/14 17:40:00, kalman wrote: > On ...
5 years, 5 months ago (2015-07-14 17:41:09 UTC) #7
llandwerlin-old
On 2015/07/14 17:41:09, kalman wrote: > https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc > File chrome/browser/extensions/extension_tab_util.cc (right): > > https://codereview.chromium.org/1239643004/diff/1/chrome/browser/extensions/extension_tab_util.cc#newcode357 > ...
5 years, 5 months ago (2015-07-16 11:58:23 UTC) #8
dgozman
https://codereview.chromium.org/1239643004/diff/160001/chrome/common/extensions/api/tabs.json File chrome/common/extensions/api/tabs.json (right): https://codereview.chromium.org/1239643004/diff/160001/chrome/common/extensions/api/tabs.json#newcode14 chrome/common/extensions/api/tabs.json:14: "id": {"type": "integer", "minimum": -1, "description": "The ID of ...
5 years, 5 months ago (2015-07-16 12:05:50 UTC) #9
llandwerlin-old
https://codereview.chromium.org/1239643004/diff/160001/chrome/common/extensions/api/tabs.json File chrome/common/extensions/api/tabs.json (right): https://codereview.chromium.org/1239643004/diff/160001/chrome/common/extensions/api/tabs.json#newcode14 chrome/common/extensions/api/tabs.json:14: "id": {"type": "integer", "minimum": -1, "description": "The ID of ...
5 years, 5 months ago (2015-07-16 12:09:23 UTC) #10
not at google - send to devlin
https://codereview.chromium.org/1239643004/diff/180001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc (right): https://codereview.chromium.org/1239643004/diff/180001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc#newcode77 chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc:77: if (params->target_tab->id < 0) { See TAB_ID_NONE comment. https://codereview.chromium.org/1239643004/diff/180001/chrome/browser/extensions/api/sessions/sessions_apitest.cc ...
5 years, 5 months ago (2015-07-16 17:09:23 UTC) #11
llandwerlin-old
https://codereview.chromium.org/1239643004/diff/180001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc (right): https://codereview.chromium.org/1239643004/diff/180001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc#newcode77 chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc:77: if (params->target_tab->id < 0) { On 2015/07/16 17:09:23, kalman ...
5 years, 5 months ago (2015-07-17 11:32:05 UTC) #12
not at google - send to devlin
lgtm with the util change. https://codereview.chromium.org/1239643004/diff/200001/chrome/browser/extensions/api/tabs/tabs_event_router.cc File chrome/browser/extensions/api/tabs/tabs_event_router.cc (right): https://codereview.chromium.org/1239643004/diff/200001/chrome/browser/extensions/api/tabs/tabs_event_router.cc#newcode132 chrome/browser/extensions/api/tabs/tabs_event_router.cc:132: if (browser->tab_strip_model() && !browser->is_devtools()) ...
5 years, 5 months ago (2015-07-17 16:44:58 UTC) #13
llandwerlin-old
Thanks again for your time. https://codereview.chromium.org/1239643004/diff/200001/chrome/browser/extensions/api/tabs/tabs_event_router.cc File chrome/browser/extensions/api/tabs/tabs_event_router.cc (right): https://codereview.chromium.org/1239643004/diff/200001/chrome/browser/extensions/api/tabs/tabs_event_router.cc#newcode132 chrome/browser/extensions/api/tabs/tabs_event_router.cc:132: if (browser->tab_strip_model() && !browser->is_devtools()) ...
5 years, 5 months ago (2015-07-17 17:05:04 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1239643004/240001
5 years, 5 months ago (2015-07-17 17:05:38 UTC) #17
commit-bot: I haz the power
The author lionel.g.landwerlin@intel.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
5 years, 5 months ago (2015-07-17 17:05:42 UTC) #18
commit-bot: I haz the power
The author lionel.g.landwerlin@intel.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
5 years, 5 months ago (2015-07-17 17:35:45 UTC) #19
commit-bot: I haz the power
The author lionel.g.landwerlin@intel.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
5 years, 5 months ago (2015-07-17 18:05:20 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/79706)
5 years, 5 months ago (2015-07-17 18:18:01 UTC) #22
llandwerlin-old
kalman@: Sorry to bother you again. After BrowserSupportsTabs() changes quite a few tests broke. Here ...
5 years, 5 months ago (2015-07-20 16:56:53 UTC) #23
llandwerlin-old
On 2015/07/20 16:56:53, llandwerlin wrote: > kalman@: Sorry to bother you again. After BrowserSupportsTabs() changes ...
5 years, 5 months ago (2015-07-20 17:12:37 UTC) #24
not at google - send to devlin
lgtm https://codereview.chromium.org/1239643004/diff/300001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc (right): https://codereview.chromium.org/1239643004/diff/300001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc#newcode78 chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc:78: *(params->target_tab->id) == api::tabs::TAB_ID_NONE) { Parents aren't necessary here, ...
5 years, 5 months ago (2015-07-20 21:29:18 UTC) #25
llandwerlin-old
https://codereview.chromium.org/1239643004/diff/300001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc (right): https://codereview.chromium.org/1239643004/diff/300001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc#newcode78 chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc:78: *(params->target_tab->id) == api::tabs::TAB_ID_NONE) { On 2015/07/20 21:29:18, kalman wrote: ...
5 years, 5 months ago (2015-07-21 09:45:41 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1239643004/320001
5 years, 5 months ago (2015-07-21 11:18:04 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1239643004/320001
5 years, 5 months ago (2015-07-21 13:10:48 UTC) #32
commit-bot: I haz the power
Committed patchset #17 (id:320001)
5 years, 5 months ago (2015-07-21 14:17:30 UTC) #33
commit-bot: I haz the power
5 years, 5 months ago (2015-07-21 14:18:42 UTC) #34
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/d2315f72405e4776861fa79919a0051538660656
Cr-Commit-Position: refs/heads/master@{#339647}

Powered by Google App Engine
This is Rietveld 408576698