• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2021 The Chromium Embedded Framework Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be found
3 // in the LICENSE file.
4 
5 #include "libcef/browser/extensions/alloy_extensions_util.h"
6 
7 #include "libcef/browser/alloy/alloy_browser_host_impl.h"
8 
9 namespace extensions {
10 namespace alloy {
11 
GetTabIdForWebContents(content::WebContents * web_contents)12 int GetTabIdForWebContents(content::WebContents* web_contents) {
13   auto browser = AlloyBrowserHostImpl::GetBrowserForContents(web_contents);
14   if (!browser)
15     return -1;
16   return browser->GetIdentifier();
17 }
18 
19 }  // namespace alloy
20 }  // namespace extensions
21