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

Issue 2811049: Add ability to limit when context menu items appear with url patterns.... (Closed)

Created:
10 years, 5 months ago by asargent_no_longer_on_chrome
Modified:
9 years, 7 months ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews, ben+cc_chromium.org, Erik does not do reviews, Paweł Hajdan Jr., Aaron Boodman, pam+watch_chromium.org, brettw-cc_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Add ability to limit when context menu items appear with url patterns. BUG=408198 TEST=Extensions context menu API should work with changes described. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=52867

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Total comments: 1

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+573 lines, -91 lines) Patch
M chrome/browser/extensions/extension_context_menu_api.h View 1 2 3 4 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_api.cc View 1 2 3 4 5 chunks +69 lines, -8 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_browsertest.cc View 1 2 3 4 3 chunks +64 lines, -15 lines 0 comments Download
M chrome/browser/extensions/extension_menu_manager.h View 1 2 3 4 7 chunks +33 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_menu_manager.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.h View 1 2 3 4 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 3 chunks +33 lines, -4 lines 0 comments Download
M chrome/common/extensions/api/extension_api.json View 1 2 3 4 2 chunks +22 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/contextMenus.html View 2 chunks +256 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extension_process_bindings.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
D chrome/test/data/extensions/context_menus/background.html View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
D chrome/test/data/extensions/context_menus/manifest.json View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
A chrome/test/data/extensions/context_menus/patterns/background.html View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/patterns/manifest.json View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/patterns/test.html View 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/context_menus/patterns/test.js View 1 2 3 4 1 chunk +52 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/context_menus/simple/background.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/context_menus/simple/manifest.json View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/context_menus/simple/test.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/context_menus/simple/test.js View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
A + chrome/test/data/extensions/context_menus/simple/test2.html View 0 chunks +-1 lines, --1 lines 0 comments Download
D chrome/test/data/extensions/context_menus/test.html View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
D chrome/test/data/extensions/context_menus/test.js View 1 2 3 4 1 chunk +0 lines, -34 lines 0 comments Download
D chrome/test/data/extensions/context_menus/test2.html View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
asargent_no_longer_on_chrome
Aaron - FYI, I made the document and target url patterns arrays of strings instead ...
10 years, 5 months ago (2010-07-15 22:41:10 UTC) #1
Aaron Boodman
Per offline, I think it would be good to use URLPattern instead of pure globs. ...
10 years, 5 months ago (2010-07-16 00:37:16 UTC) #2
asargent_no_longer_on_chrome
Switched to using URLPattern's. http://codereview.chromium.org/2811049/diff/9001/10009 File chrome/renderer/resources/extension_process_bindings.js (right): http://codereview.chromium.org/2811049/diff/9001/10009#newcode282 chrome/renderer/resources/extension_process_bindings.js:282: onclick.apply(onclick, arguments); On 2010/07/16 00:37:16, ...
10 years, 5 months ago (2010-07-16 18:22:52 UTC) #3
asargent_no_longer_on_chrome
Per offline dicsussion, switched to using ExtensionExtent instead of URLPatternList.
10 years, 5 months ago (2010-07-16 20:32:06 UTC) #4
Aaron Boodman
10 years, 5 months ago (2010-07-16 23:30:49 UTC) #5
lgtm

http://codereview.chromium.org/2811049/diff/39001/36008
File chrome/common/extensions/api/extension_api.json (right):

http://codereview.chromium.org/2811049/diff/39001/36008#newcode2557
chrome/common/extensions/api/extension_api.json:2557: "description": "Lets you
restrict the item to only apply to documents whose URL matches one of the given
patterns. (This applies to frames as well). The patterns use the same format as
the 'matches' part of the content declaration in an extension manifest. See the
'Match Patterns' reference for more details."
Nit: I think you can remove the sentence beginning with "the patterns use the
same format...". You can also hyperlink 'Match Patterns' to the page in
question. Search this file for '<a' for an example.

Powered by Google App Engine
This is Rietveld 408576698