| 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 "extensions/shell/browser/shell_extensions_api_client.h" | 5 #include "extensions/shell/browser/shell_extensions_api_client.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "extensions/shell/browser/delegates/shell_kiosk_delegate.h" | 8 #include "extensions/shell/browser/delegates/shell_kiosk_delegate.h" |
| 9 #include "extensions/shell/browser/shell_app_view_guest_delegate.h" | 9 #include "extensions/shell/browser/shell_app_view_guest_delegate.h" |
| 10 #include "extensions/shell/browser/shell_extension_web_contents_observer.h" | 10 #include "extensions/shell/browser/shell_extension_web_contents_observer.h" |
| 11 #include "extensions/shell/browser/shell_virtual_keyboard_delegate.h" | 11 #include "extensions/shell/browser/shell_virtual_keyboard_delegate.h" |
| 12 | 12 |
| 13 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 14 #include "extensions/shell/browser/api/file_system/shell_file_system_delegate.h" |
| 15 #endif |
| 16 |
| 13 namespace extensions { | 17 namespace extensions { |
| 14 | 18 |
| 15 ShellExtensionsAPIClient::ShellExtensionsAPIClient() { | 19 ShellExtensionsAPIClient::ShellExtensionsAPIClient() {} |
| 16 } | 20 |
| 21 ShellExtensionsAPIClient::~ShellExtensionsAPIClient() {} |
| 17 | 22 |
| 18 void ShellExtensionsAPIClient::AttachWebContentsHelpers( | 23 void ShellExtensionsAPIClient::AttachWebContentsHelpers( |
| 19 content::WebContents* web_contents) const { | 24 content::WebContents* web_contents) const { |
| 20 ShellExtensionWebContentsObserver::CreateForWebContents(web_contents); | 25 ShellExtensionWebContentsObserver::CreateForWebContents(web_contents); |
| 21 } | 26 } |
| 22 | 27 |
| 23 AppViewGuestDelegate* ShellExtensionsAPIClient::CreateAppViewGuestDelegate() | 28 AppViewGuestDelegate* ShellExtensionsAPIClient::CreateAppViewGuestDelegate() |
| 24 const { | 29 const { |
| 25 return new ShellAppViewGuestDelegate(); | 30 return new ShellAppViewGuestDelegate(); |
| 26 } | 31 } |
| 27 | 32 |
| 28 std::unique_ptr<VirtualKeyboardDelegate> | 33 std::unique_ptr<VirtualKeyboardDelegate> |
| 29 ShellExtensionsAPIClient::CreateVirtualKeyboardDelegate() const { | 34 ShellExtensionsAPIClient::CreateVirtualKeyboardDelegate() const { |
| 30 return base::MakeUnique<ShellVirtualKeyboardDelegate>(); | 35 return base::MakeUnique<ShellVirtualKeyboardDelegate>(); |
| 31 } | 36 } |
| 32 | 37 |
| 38 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 39 FileSystemDelegate* ShellExtensionsAPIClient::GetFileSystemDelegate() { |
| 40 if (!file_system_delegate_) |
| 41 file_system_delegate_ = base::MakeUnique<ShellFileSystemDelegate>(); |
| 42 return file_system_delegate_.get(); |
| 43 } |
| 44 #endif |
| 45 |
| 33 } // namespace extensions | 46 } // namespace extensions |
| OLD | NEW |