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

Issue 9162002: Query the current window with chrome.tabs.query using -1. (Closed)

Created:
8 years, 11 months ago by jstritar
Modified:
8 years, 11 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip+watch_chromium.org
Visibility:
Public.

Description

Query the current window with chrome.tabs.query using -1. This makes querying for tabs in the current window easier by requiring less callbacks. BUG=108942 TEST=ExtensionApiTest.TabQuery Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117107

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 2

Patch Set 4 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -8 lines) Patch
M chrome/browser/extensions/extension_tabs_module.cc View 1 2 3 3 chunks +6 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/tabs.json View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/windows.json View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/tabs.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/windows.html View 1 2 2 chunks +76 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_constants.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/schema_generated_bindings.js View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/tabs/basics/query.js View 1 2 2 chunks +14 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
jstritar
8 years, 11 months ago (2012-01-09 21:52:13 UTC) #1
asargent_no_longer_on_chrome
C++ code seems fine. One nit on the js API side - I think most ...
8 years, 11 months ago (2012-01-09 22:59:26 UTC) #2
jstritar
+aa I went with -1 because we can't distinguish between null and undefined on the ...
8 years, 11 months ago (2012-01-09 23:23:53 UTC) #3
mihaip_google.com
We should probably have a constant the way there is chrome.windows.WINDOW_ID_NONE ( http://code.google.com/chrome/extensions/dev/windows.html#property-WINDOW_ID_NONE) for indicating ...
8 years, 11 months ago (2012-01-09 23:31:20 UTC) #4
jstritar
On 2012/01/09 23:31:20, mihaip wrote: > We should probably have a constant the way there ...
8 years, 11 months ago (2012-01-10 00:32:04 UTC) #5
jstritar
I updated the query method to use chrome.windows.WINDOW_ID_CURRENT. Many of the existing methods don't support ...
8 years, 11 months ago (2012-01-10 19:02:43 UTC) #6
asargent_no_longer_on_chrome
LGTM w/ one nit http://codereview.chromium.org/9162002/diff/7001/chrome/browser/extensions/extension_tabs_module.cc File chrome/browser/extensions/extension_tabs_module.cc (right): http://codereview.chromium.org/9162002/diff/7001/chrome/browser/extensions/extension_tabs_module.cc#newcode785 chrome/browser/extensions/extension_tabs_module.cc:785: int window_id = extension_misc::kCurrentWindowId - ...
8 years, 11 months ago (2012-01-10 20:06:46 UTC) #7
jstritar
FYI: created http://crbug.com/109776 for making the APIs use those window constants consistently http://codereview.chromium.org/9162002/diff/7001/chrome/browser/extensions/extension_tabs_module.cc File chrome/browser/extensions/extension_tabs_module.cc ...
8 years, 11 months ago (2012-01-10 20:29:22 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jstritar@chromium.org/9162002/14001
8 years, 11 months ago (2012-01-10 21:05:27 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jstritar@chromium.org/9162002/14001
8 years, 11 months ago (2012-01-10 21:05:47 UTC) #10
commit-bot: I haz the power
8 years, 11 months ago (2012-01-10 23:21:27 UTC) #11
Change committed as 117107

Powered by Google App Engine
This is Rietveld 408576698