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

Issue 385061: experimental.popup support for tab-content-viewed extensions (Closed)

Created:
11 years, 1 month ago by jeff.timanus
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org, ben+cc_chromium.org, Erik does not do reviews, jam, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr., darin (slow to review)
Visibility:
Public.

Description

Refactoring of the chrome.experimental.popup API implementation to allow display of pop-ups for extensions viewed through a tab-contents view.I added a new class, ExtensionPopupHost. This class implements the necessary environment for managing child popup windows from either an ExtensionHost, or an ExtensionDOMUI. Note that this class is added as a member to ExtensionHost and ExtensionDOMUI. I decided to take this approach to prevent multiple inheritance of the NotificationObserver class: Both ExtensionPopupHost and ExtensionHost must inherit from this class, and I was uncertain of how the system would behave wrt virtual inheritance. Please comment on if I should have used the inheritance approach. I also removed the customHandler tag (in extension_api.json) that I had added in the initial submission. The arguments in the schema are now those that users of the API see. The nodocs tags were also removed. The api experimental.popup.getAnchorWindow() has been renamed to popup.getParentWindow, as per a suggestion from Erik K. BUG=none TEST=extension_popup_apitest.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=32120

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 44

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 6

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 8

Patch Set 8 : '' #

Patch Set 9 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+760 lines, -126 lines) Patch
M chrome/browser/extensions/extension_dom_ui.h View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_dom_ui.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.h View 1 2 3 4 5 3 chunks +16 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.cc View 1 2 3 4 5 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_host.h View 1 2 3 4 5 7 chunks +5 lines, -38 lines 0 comments Download
M chrome/browser/extensions/extension_host.cc View 1 2 3 4 5 5 chunks +0 lines, -54 lines 0 comments Download
M chrome/browser/extensions/extension_popup_api.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_popup_api.cc View 1 2 3 4 5 4 chunks +55 lines, -7 lines 0 comments Download
A chrome/browser/extensions/extension_popup_host.h View 1 2 3 4 1 chunk +104 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_popup_host.cc View 1 2 3 4 5 6 7 8 1 chunk +95 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/extension_api.json View 1 2 3 4 5 3 chunks +2 lines, -3 lines 0 comments Download
A chrome/common/extensions/docs/experimental.popup.html View 1 2 3 4 5 6 7 8 1 chunk +398 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/extension_process_bindings.cc View 5 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/resources/extension_process_bindings.js View 1 2 3 4 5 6 7 8 5 chunks +30 lines, -12 lines 0 comments Download
M chrome/test/data/extensions/api_test/popup_api/toolband.html View 1 2 3 4 5 6 7 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/popup_api/toolband_popup.html View 1 2 3 4 5 3 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
jeff.timanus
Hi Guys, Please review this CL. It does not address the recently discovered flakiness of ...
11 years, 1 month ago (2009-11-12 05:26:29 UTC) #1
Erik does not do reviews
I'll defer to rafael on the api.json changes. http://codereview.chromium.org/385061/diff/18/20 File chrome/browser/extensions/extension_dom_ui.cc (right): http://codereview.chromium.org/385061/diff/18/20#newcode38 Line 38: ...
11 years, 1 month ago (2009-11-12 22:41:29 UTC) #2
jeff.timanus
Thanks for your review, Erik. I addressed all of the changes you suggested. Also, I've ...
11 years, 1 month ago (2009-11-13 04:03:21 UTC) #3
Erik does not do reviews
It looks like you didn't upload these changes yet. Erik On Thu, Nov 12, 2009 ...
11 years, 1 month ago (2009-11-13 18:38:20 UTC) #4
jeff.timanus
On 2009/11/13 18:38:20, Erik Kay wrote: > It looks like you didn't upload these changes ...
11 years, 1 month ago (2009-11-13 18:52:53 UTC) #5
rafaelw
only reviewed extension_process_bindings.js and extension_api.json http://codereview.chromium.org/385061/diff/5018/5028 File chrome/common/extensions/api/extension_api.json (right): http://codereview.chromium.org/385061/diff/5018/5028#newcode1656 Line 1656: "type": "any", Did ...
11 years, 1 month ago (2009-11-13 19:03:25 UTC) #6
jeff.timanus
Comments addressed. http://codereview.chromium.org/385061/diff/5018/5028 File chrome/common/extensions/api/extension_api.json (right): http://codereview.chromium.org/385061/diff/5018/5028#newcode1656 Line 1656: "type": "any", On 2009/11/13 19:03:26, rafaelw ...
11 years, 1 month ago (2009-11-13 19:51:31 UTC) #7
rafaelw
lgtm on extension_process_bindings.js and extension_api.json
11 years, 1 month ago (2009-11-13 19:54:07 UTC) #8
Erik does not do reviews
LGTM - just nits http://codereview.chromium.org/385061/diff/7002/7016 File chrome/browser/extensions/extension_popup_host.cc (right): http://codereview.chromium.org/385061/diff/7002/7016#newcode15 Line 15: #endif // defined(TOOLKIT_VIEWS) remove ...
11 years, 1 month ago (2009-11-13 21:38:57 UTC) #9
twiz
11 years, 1 month ago (2009-11-13 21:55:07 UTC) #10
http://codereview.chromium.org/385061/diff/7002/7016
File chrome/browser/extensions/extension_popup_host.cc (right):

http://codereview.chromium.org/385061/diff/7002/7016#newcode15
Line 15: #endif  // defined(TOOLKIT_VIEWS)
On 2009/11/13 21:38:57, Erik Kay wrote:
> remove comment

Done.

http://codereview.chromium.org/385061/diff/7002/7016#newcode24
Line 24: }
On 2009/11/13 21:38:57, Erik Kay wrote:
> remove {}

Done.

http://codereview.chromium.org/385061/diff/7002/7013
File chrome/renderer/resources/extension_process_bindings.js (right):

http://codereview.chromium.org/385061/diff/7002/7013#newcode322
Line 322: if (this.handleRequest)
On 2009/11/13 21:38:57, Erik Kay wrote:
> add {} here (multiline block plus JS style)

Done.

http://codereview.chromium.org/385061/diff/7002/7013#newcode326
Line 326: this.definition.parameters);
On 2009/11/13 21:38:57, Erik Kay wrote:
> indent

Done.

Powered by Google App Engine
This is Rietveld 408576698