blob: 557f5c7c3ee5c8ef26344caafd8903be0df9dfc0 [file] [log] [blame]
[email protected]9fe42042013-10-29 21:13:331// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "extensions/browser/extensions_browser_client.h"
6
wittmanb3ee0482015-06-24 17:47:407#include "base/logging.h"
asargent631a99a2015-10-15 21:51:488#include "components/update_client/update_client.h"
rdevlin.cronin1790e822016-04-05 21:03:359#include "extensions/browser/extension_api_frame_id_map.h"
wittmanb3ee0482015-06-24 17:47:4010#include "extensions/browser/extension_error.h"
[email protected]9fe42042013-10-29 21:13:3311
12namespace extensions {
13
14namespace {
15
Jens Widellc2688272018-02-02 09:08:3116ExtensionsBrowserClient* g_extension_browser_client = NULL;
[email protected]9fe42042013-10-29 21:13:3317
18} // namespace
19
asargent631a99a2015-10-15 21:51:4820scoped_refptr<update_client::UpdateClient>
21ExtensionsBrowserClient::CreateUpdateClient(content::BrowserContext* context) {
22 return scoped_refptr<update_client::UpdateClient>(nullptr);
23}
24
rdevlin.cronin1790e822016-04-05 21:03:3525std::unique_ptr<ExtensionApiFrameIdMapHelper>
26ExtensionsBrowserClient::CreateExtensionApiFrameIdMapHelper(
27 ExtensionApiFrameIdMap* map) {
28 return nullptr;
rdevlin.cronin9a62870f2016-02-11 23:25:5829}
30
juncai17fc8532016-06-02 06:45:5031std::unique_ptr<content::BluetoothChooser>
32ExtensionsBrowserClient::CreateBluetoothChooser(
33 content::RenderFrameHost* frame,
34 const content::BluetoothChooser::EventHandler& event_handler) {
35 return nullptr;
36}
37
dchengf5d241082016-04-21 03:43:1138void ExtensionsBrowserClient::ReportError(
39 content::BrowserContext* context,
40 std::unique_ptr<ExtensionError> error) {
wittmanb3ee0482015-06-24 17:47:4041 LOG(ERROR) << error->GetDebugString();
42}
43
rdevlin.cronin6fba7ec2016-06-24 16:15:0544bool ExtensionsBrowserClient::IsActivityLoggingEnabled(
45 content::BrowserContext* context) {
46 return false;
47}
48
jam059a6b42016-10-19 22:06:5449ExtensionNavigationUIData*
50ExtensionsBrowserClient::GetExtensionNavigationUIData(
51 net::URLRequest* request) {
52 return nullptr;
53}
54
Ken Rockot06d07e32018-02-27 16:24:2255void ExtensionsBrowserClient::GetTabAndWindowIdForWebContents(
56 content::WebContents* web_contents,
57 int* tab_id,
58 int* window_id) {
59 *tab_id = -1;
60 *window_id = -1;
61}
62
Minh X. Nguyen3bfb32282017-11-09 17:11:1463bool ExtensionsBrowserClient::IsExtensionEnabled(
64 const std::string& extension_id,
65 content::BrowserContext* context) const {
66 return false;
67}
68
[email protected]9fe42042013-10-29 21:13:3369ExtensionsBrowserClient* ExtensionsBrowserClient::Get() {
Jens Widellc2688272018-02-02 09:08:3170 return g_extension_browser_client;
[email protected]9fe42042013-10-29 21:13:3371}
72
73void ExtensionsBrowserClient::Set(ExtensionsBrowserClient* client) {
Jens Widellc2688272018-02-02 09:08:3174 g_extension_browser_client = client;
[email protected]9fe42042013-10-29 21:13:3375}
76
77} // namespace extensions