mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-13 18:16:20 +01:00
de66fb9406
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.
21 lines
607 B
C++
21 lines
607 B
C++
// Copyright 2021 The Chromium Embedded Framework Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be found
|
|
// in the LICENSE file.
|
|
|
|
#include "libcef/browser/extensions/alloy_extensions_util.h"
|
|
|
|
#include "libcef/browser/alloy/alloy_browser_host_impl.h"
|
|
|
|
namespace extensions {
|
|
namespace alloy {
|
|
|
|
int GetTabIdForWebContents(content::WebContents* web_contents) {
|
|
auto browser = AlloyBrowserHostImpl::GetBrowserForContents(web_contents);
|
|
if (!browser)
|
|
return -1;
|
|
return browser->GetIdentifier();
|
|
}
|
|
|
|
} // namespace alloy
|
|
} // namespace extensions
|