| 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/chrome_app_view_guest_delegate.h" | 9 #include "chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h" |
| 10 #include "chrome/browser/guest_view/extension_options/extension_options_guest.h" | 10 #include "chrome/browser/guest_view/extension_options/extension_options_guest.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 (*caches)[settings_namespace::SYNC] = | 36 (*caches)[settings_namespace::SYNC] = |
| 37 new SyncValueStoreCache(factory, observers, context->GetPath()); | 37 new SyncValueStoreCache(factory, observers, context->GetPath()); |
| 38 | 38 |
| 39 #if defined(ENABLE_CONFIGURATION_POLICY) | 39 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 40 // Add support for chrome.storage.managed. | 40 // Add support for chrome.storage.managed. |
| 41 (*caches)[settings_namespace::MANAGED] = | 41 (*caches)[settings_namespace::MANAGED] = |
| 42 new ManagedValueStoreCache(context, factory, observers); | 42 new ManagedValueStoreCache(context, factory, observers); |
| 43 #endif | 43 #endif |
| 44 } | 44 } |
| 45 | 45 |
| 46 bool ChromeExtensionsAPIClient::AppViewInternalAttachFrame( | |
| 47 content::BrowserContext* browser_context, | |
| 48 const GURL& url, | |
| 49 int guest_instance_id, | |
| 50 const std::string& guest_extension_id) { | |
| 51 return AppViewGuest::CompletePendingRequest(browser_context, | |
| 52 url, | |
| 53 guest_instance_id, | |
| 54 guest_extension_id); | |
| 55 } | |
| 56 | |
| 57 bool ChromeExtensionsAPIClient::AppViewInternalDenyRequest( | |
| 58 content::BrowserContext* browser_context, | |
| 59 int guest_instance_id, | |
| 60 const std::string& guest_extension_id) { | |
| 61 return AppViewGuest::CompletePendingRequest(browser_context, | |
| 62 GURL(), | |
| 63 guest_instance_id, | |
| 64 guest_extension_id); | |
| 65 } | |
| 66 | |
| 67 AppViewGuestDelegate* ChromeExtensionsAPIClient::CreateAppViewGuestDelegate() | 46 AppViewGuestDelegate* ChromeExtensionsAPIClient::CreateAppViewGuestDelegate() |
| 68 const { | 47 const { |
| 69 return new ChromeAppViewGuestDelegate(); | 48 return new ChromeAppViewGuestDelegate(); |
| 70 } | 49 } |
| 71 | 50 |
| 72 WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate( | 51 WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate( |
| 73 WebViewGuest* web_view_guest) const { | 52 WebViewGuest* web_view_guest) const { |
| 74 return new ChromeWebViewGuestDelegate(web_view_guest); | 53 return new ChromeWebViewGuestDelegate(web_view_guest); |
| 75 } | 54 } |
| 76 | 55 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 87 content::BrowserThread::UI))); | 66 content::BrowserThread::UI))); |
| 88 } | 67 } |
| 89 return hid_service_.get(); | 68 return hid_service_.get(); |
| 90 } | 69 } |
| 91 | 70 |
| 92 void ChromeExtensionsAPIClient::RegisterGuestViewTypes() { | 71 void ChromeExtensionsAPIClient::RegisterGuestViewTypes() { |
| 93 ExtensionOptionsGuest::Register(); | 72 ExtensionOptionsGuest::Register(); |
| 94 } | 73 } |
| 95 | 74 |
| 96 } // namespace extensions | 75 } // namespace extensions |
| OLD | NEW |