OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/api/chrome_extensions_api_client.h" | 5 #include "chrome/browser/extensions/api/chrome_extensions_api_client.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "chrome/browser/extensions/api/storage/sync_value_store_cache.h" | 8 #include "chrome/browser/extensions/api/storage/sync_value_store_cache.h" |
9 #include "chrome/browser/guest_view/app_view/app_view_guest.h" | 9 #include "chrome/browser/guest_view/app_view/app_view_guest.h" |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
| 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "device/hid/hid_service.h" |
11 | 13 |
12 #if defined(ENABLE_CONFIGURATION_POLICY) | 14 #if defined(ENABLE_CONFIGURATION_POLICY) |
13 #include "chrome/browser/extensions/api/storage/managed_value_store_cache.h" | 15 #include "chrome/browser/extensions/api/storage/managed_value_store_cache.h" |
14 #endif | 16 #endif |
15 | 17 |
16 namespace extensions { | 18 namespace extensions { |
17 | 19 |
18 ChromeExtensionsAPIClient::ChromeExtensionsAPIClient() {} | 20 ChromeExtensionsAPIClient::ChromeExtensionsAPIClient() {} |
19 | 21 |
20 ChromeExtensionsAPIClient::~ChromeExtensionsAPIClient() {} | 22 ChromeExtensionsAPIClient::~ChromeExtensionsAPIClient() {} |
(...skipping 28 matching lines...) Expand all Loading... |
49 bool ChromeExtensionsAPIClient::AppViewInternalDenyRequest( | 51 bool ChromeExtensionsAPIClient::AppViewInternalDenyRequest( |
50 content::BrowserContext* browser_context, | 52 content::BrowserContext* browser_context, |
51 int guest_instance_id, | 53 int guest_instance_id, |
52 const std::string& guest_extension_id) { | 54 const std::string& guest_extension_id) { |
53 return AppViewGuest::CompletePendingRequest(browser_context, | 55 return AppViewGuest::CompletePendingRequest(browser_context, |
54 GURL(), | 56 GURL(), |
55 guest_instance_id, | 57 guest_instance_id, |
56 guest_extension_id); | 58 guest_extension_id); |
57 } | 59 } |
58 | 60 |
| 61 device::HidService* ChromeExtensionsAPIClient::GetHidService() { |
| 62 if (!hid_service_) { |
| 63 hid_service_.reset(device::HidService::Create( |
| 64 content::BrowserThread::GetMessageLoopProxyForThread( |
| 65 content::BrowserThread::UI))); |
| 66 } |
| 67 return hid_service_.get(); |
| 68 } |
| 69 |
59 } // namespace extensions | 70 } // namespace extensions |
OLD | NEW |