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

Issue 10909256: Always send the full tab object in ExtensionAction click event. (Closed)

Created:
8 years, 3 months ago by Aaron Boodman
Modified:
8 years, 3 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Always send the full tab object in ExtensionAction click event. Along the way, decompose a few swiss army knife functions to simplify and generalize code. BUG=149020 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=157082

Patch Set 1 #

Patch Set 2 : manual testing works #

Patch Set 3 : yo #

Patch Set 4 : android #

Patch Set 5 : Realized that any API outside of tabs.json and windows.json that referenced tabs.Tab would have sam… #

Total comments: 2

Patch Set 6 : delete moar #

Patch Set 7 : 'add some tests' #

Total comments: 9

Patch Set 8 : kalments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -151 lines) Patch
M chrome/browser/extensions/api/extension_action/browser_action_apitest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/messaging/message_service.cc View 1 2 3 4 4 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/extensions/browser_event_router.h View 1 chunk +0 lines, -20 lines 0 comments Download
M chrome/browser/extensions/browser_event_router.cc View 1 2 3 4 5 6 7 4 chunks +47 lines, -51 lines 0 comments Download
M chrome/browser/extensions/extension_tab_util.h View 1 2 3 4 1 chunk +19 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_tab_util.cc View 1 2 3 4 4 chunks +14 lines, -39 lines 0 comments Download
M chrome/browser/extensions/extension_tab_util_android.cc View 1 2 3 4 5 2 chunks +3 lines, -9 lines 0 comments Download
M chrome/browser/extensions/menu_manager.cc View 1 2 3 4 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/browser_action/basics/background.js View 1 2 3 4 5 6 1 chunk +10 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/browser_action/basics/manifest.json View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/messaging/connect/test.js View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Aaron Boodman
8 years, 3 months ago (2012-09-16 02:15:26 UTC) #1
Aaron Boodman
+hebert.christopherj fyi
8 years, 3 months ago (2012-09-16 07:30:10 UTC) #2
Aaron Boodman
https://codereview.chromium.org/10909256/diff/5002/chrome/browser/extensions/extension_tab_util.cc File chrome/browser/extensions/extension_tab_util.cc (left): https://codereview.chromium.org/10909256/diff/5002/chrome/browser/extensions/extension_tab_util.cc#oldcode125 chrome/browser/extensions/extension_tab_util.cc:125: tab_index, APIPermission::kTab) || bug here! should be tab_id!
8 years, 3 months ago (2012-09-16 08:54:08 UTC) #3
not at google - send to devlin
lgtm http://codereview.chromium.org/10909256/diff/4003/chrome/browser/extensions/api/messaging/message_service.cc File chrome/browser/extensions/api/messaging/message_service.cc (right): http://codereview.chromium.org/10909256/diff/4003/chrome/browser/extensions/api/messaging/message_service.cc#newcode165 chrome/browser/extensions/api/messaging/message_service.cc:165: source_contents, ExtensionTabUtil::INCLUDE_PRIVACY_SENSITIVE_FIELDS)); so I guess this is safe ...
8 years, 3 months ago (2012-09-17 01:46:53 UTC) #4
Aaron Boodman
http://codereview.chromium.org/10909256/diff/4003/chrome/browser/extensions/api/messaging/message_service.cc File chrome/browser/extensions/api/messaging/message_service.cc (right): http://codereview.chromium.org/10909256/diff/4003/chrome/browser/extensions/api/messaging/message_service.cc#newcode165 chrome/browser/extensions/api/messaging/message_service.cc:165: source_contents, ExtensionTabUtil::INCLUDE_PRIVACY_SENSITIVE_FIELDS)); On 2012/09/17 01:46:53, kalman wrote: > so ...
8 years, 3 months ago (2012-09-17 03:22:17 UTC) #5
chebert
https://chromiumcodereview.appspot.com/10909256/diff/5002/chrome/browser/extensions/extension_tab_util.cc File chrome/browser/extensions/extension_tab_util.cc (left): https://chromiumcodereview.appspot.com/10909256/diff/5002/chrome/browser/extensions/extension_tab_util.cc#oldcode125 chrome/browser/extensions/extension_tab_util.cc:125: tab_index, APIPermission::kTab) || ahh dang. I think this is ...
8 years, 3 months ago (2012-09-17 05:20:01 UTC) #6
not at google - send to devlin
http://codereview.chromium.org/10909256/diff/4003/chrome/browser/extensions/extension_tab_util.cc File chrome/browser/extensions/extension_tab_util.cc (left): http://codereview.chromium.org/10909256/diff/4003/chrome/browser/extensions/extension_tab_util.cc#oldcode127 chrome/browser/extensions/extension_tab_util.cc:127: tab_index, APIPermission::kWebNavigation); On 2012/09/17 03:22:17, Aaron Boodman wrote: > ...
8 years, 3 months ago (2012-09-17 05:28:20 UTC) #7
Aaron Boodman
On Sun, Sep 16, 2012 at 10:28 PM, <kalman@chromium.org> wrote: > Am I confused? Maybe ...
8 years, 3 months ago (2012-09-17 05:32:04 UTC) #8
Aaron Boodman
8 years, 3 months ago (2012-09-17 05:51:12 UTC) #9
http://codereview.chromium.org/10909256/diff/4003/chrome/browser/extensions/b...
File chrome/browser/extensions/browser_event_router.cc (right):

http://codereview.chromium.org/10909256/diff/4003/chrome/browser/extensions/b...
chrome/browser/extensions/browser_event_router.cc:418:
args_base->Append(Value::CreateIntegerValue(
On 2012/09/17 01:46:53, kalman wrote:
> can use AppendInteger now.

Done.

http://codereview.chromium.org/10909256/diff/4003/chrome/browser/extensions/b...
chrome/browser/extensions/browser_event_router.cc:594:
tab_contents->web_contents(), NULL, -1,
On 2012/09/17 01:46:53, kalman wrote:
> It looks like you've added a convenience form of this which leaves out the
NULL
> and -1 arguments? Use that?

Done.

Powered by Google App Engine
This is Rietveld 408576698