mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
alloy: Fix link click navigation in PDF files (fixes issue #3143)
This change adds a minimal implementation of the |tabs.update| extension API and modifies StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent to return a valid |streamInfo.tabId| value as required by the navigateInCurrentTab implementation in chrome/browser/resources/pdf/browser_api.js.
This commit is contained in:
@ -318,24 +318,12 @@ base::DictionaryValue* CefExtensionFunctionDetails::OpenTab(
|
||||
GURL url;
|
||||
if (params.url.get()) {
|
||||
std::string url_string = *params.url;
|
||||
url = ExtensionTabUtil::ResolvePossiblyRelativeURL(url_string,
|
||||
function()->extension());
|
||||
if (!url.is_valid()) {
|
||||
if (error_message) {
|
||||
*error_message =
|
||||
ErrorUtils::FormatErrorMessage(keys::kInvalidUrlError, url_string);
|
||||
}
|
||||
if (!ExtensionTabUtil::PrepareURLForNavigation(
|
||||
url_string, function()->extension(), &url, error_message)) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// Don't let extensions crash the browser or renderers.
|
||||
if (ExtensionTabUtil::IsKillURL(url)) {
|
||||
if (error_message)
|
||||
*error_message = keys::kNoCrashBrowserError;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Default to foreground for the new tab. The presence of 'active' property
|
||||
// will override this default.
|
||||
bool active = true;
|
||||
|
Reference in New Issue
Block a user