New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 637889 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

webstorePrivate APIs are not available inside <webview>

Project Member Reported by phu@chromium.org, Aug 15 2016

Issue description

Version: all
OS: all

What steps will reproduce the problem?
(1) Create a <webview> element in a WebUI html, and point to https://webstore-staging.corp.google.com/webstore
(2) Launch Chrome with out/Release/chrome %U --apps-gallery-update-url=https://download-staging.corp.google.com/service/update2/crx --apps-gallery-url=https://webstore-staging.corp.google.com
(3) Go to a detail page like: /webstore/detail/bibme/aagjampabbbjnkffomfmfccnjanbloci in both the WebUI page as well as the normal https URL e.g. https://webstore-staging.corp.google.com/webstore/detail/bibme/aagjampabbbjnkffomfmfccnjanbloci


What is the expected output?
In both cases, the install button should show, which indicates the chrome.webstorePrivate API is available.

What do you see instead?
The webstorePrivate API is only available at the external URL, but not in the <webview>. I've tried modifying chrome/common/extensions/api/_api_features.json
https://cs.chromium.org/chromium/src/chrome/common/extensions/api/_api_features.json?q=webstorePrivate+file:.*.json&l=830&dr=C

chrome/common/extensions/api/_permission_features.json
https://cs.chromium.org/chromium/src/chrome/common/extensions/api/_permission_features.json?q=webstorePrivate+file:.*.json&l=1031&dr=C but somehow still did not work. 

Please use labels and text to provide additional information.

 
webview.png
117 KB View Download
externalURL.png
131 KB View Download

Comment 1 by phu@chromium.org, Aug 15 2016

One missing step, you would probably need to hack ChromeContentBrowserClientExtensionsPart::CanCommitURL() to allow <webview> to load Web Store pages.
Cc: phu@chromium.org lazyboy@chromium.org rdevlin....@chromium.org catmulli...@chromium.org asargent@chromium.org
Components: Platform>Extensions
Cc: -rdevlin....@chromium.org
Owner: rdevlin....@chromium.org
Status: Assigned (was: Untriaged)
Assigning to myself to get it out of triage.

It seems like there's some ambiguity around whether or not we should do this.  I also suspect the reason its unavailable is because we restrict the permission to hosted apps, and when the site is in a webview, I'm not sure we'd categorize it as such (nor am I entirely sure we should).

Comment 4 by phu@chromium.org, Aug 19 2016

Based on Nasko's comment, it seems we shouldn't grant the permission to content inside <webview>, so I'll look into calling a postMessage and let the host WebUI install the item. Thanks!
Status: Archived (was: Assigned)
Closing this one out for now.

Sign in to add a comment