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

Issue 243001: Implement Browser Actions extensions.... (Closed)

Created:
11 years, 3 months ago by Finnur
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, jam, pam+watch_chromium.org, Paweł Hajdan Jr., darin (slow to review), brettw, Ben Goodger (Google), tim (not reviewing)
Visibility:
Public.

Description

Implement Browser Actions extensions. Browser Actions are like Page Actions, except they appear next to the Omnibox and are always visible. For details see http://code.google.com/p/chromium/wiki/BrowserActions. Added a simple browser action sample that adds a Print button to the chrome toolbar (which brings up the Print dialog for the current page). Removed |type| from PageActions, which is currently ignored and was already removed from the docs. Each extension can only have 1 browser_action. Each browser action can specify more than one icon, but only the first is used. And no API has been added yet (besides the event definition). BUG=22099 TEST=Install the sample browser action, navigate to google.com, press the print button. A print dialog should come up. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27319

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 46

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+613 lines, -158 lines) Patch
M chrome/browser/extensions/extension_browser_event_router.h View 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_browser_event_router.cc View 1 2 chunks +12 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_file_util.cc View 1 2 3 4 5 2 chunks +17 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_page_actions_module.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_process_manager.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extensions_service.h View 1 2 3 4 2 chunks +12 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extensions_service.cc View 1 2 3 4 2 chunks +28 lines, -13 lines 0 comments Download
M chrome/browser/gtk/location_bar_view_gtk.h View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/gtk/location_bar_view_gtk.cc View 3 4 5 6 4 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.h View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 2 chunks +4 lines, -4 lines 0 comments Download
A chrome/browser/views/browser_actions_container.h View 5 1 chunk +69 lines, -0 lines 0 comments Download
A chrome/browser/views/browser_actions_container.cc View 5 1 chunk +207 lines, -0 lines 0 comments Download
M chrome/browser/views/location_bar_view.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/views/location_bar_view.cc View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/views/toolbar_view.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/views/toolbar_view.cc View 1 2 3 4 6 chunks +12 lines, -3 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 4 5 5 chunks +18 lines, -10 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 4 9 chunks +52 lines, -43 lines 2 comments Download
M chrome/common/extensions/extension_constants.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_constants.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 3 chunks +84 lines, -35 lines 0 comments Download
M chrome/common/page_action.h View 1 2 3 4 3 chunks +20 lines, -19 lines 0 comments Download
MM chrome/common/page_action.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/renderer/renderer_resources.grd View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/resources/extension_process_bindings.js View 2 chunks +8 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/samples/print_browser_action/background.html View 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/samples/print_browser_action/manifest.json View 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/samples/print_browser_action/print_16x16.png View Binary file 0 comments Download

Messages

Total messages: 4 (0 generated)
Finnur
This looks a bit scarier than it is, but a lot of files just have ...
11 years, 3 months ago (2009-09-25 14:47:34 UTC) #1
Erik does not do reviews
I'm unhappy about the 1/many split between browser actions and page actions. To my mind, ...
11 years, 3 months ago (2009-09-25 17:10:48 UTC) #2
Finnur
I have updated the changelist. Please have another look. As discussed offline - we've decided ...
11 years, 3 months ago (2009-09-25 22:34:38 UTC) #3
Erik does not do reviews
11 years, 3 months ago (2009-09-25 22:56:11 UTC) #4
LGTM

http://codereview.chromium.org/243001/diff/6078/5061
File chrome/common/extensions/extension.cc (right):

http://codereview.chromium.org/243001/diff/6078/5061#newcode111
Line 111: delete browser_action_;
just change this to a scoped_ptr

http://codereview.chromium.org/243001/diff/6078/5061#newcode156
Line 156: return browser_action_;
DCHECK(id.empty())

Powered by Google App Engine
This is Rietveld 408576698