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/chrome_extension_host_delegate.h" | 5 #include "chrome/browser/extensions/chrome_extension_host_delegate.h" |
6 | 6 |
| 7 #include "base/lazy_instance.h" |
7 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/extension_tab_util.h" | 10 #include "chrome/browser/extensions/extension_tab_util.h" |
10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 11 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
11 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 12 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
12 #include "components/app_modal/javascript_dialog_manager.h" | 13 #include "components/app_modal/javascript_dialog_manager.h" |
13 #include "extensions/browser/extension_host.h" | 14 #include "extensions/browser/extension_host.h" |
14 #include "extensions/browser/extension_system.h" | 15 #include "extensions/browser/extension_system.h" |
| 16 #include "extensions/browser/serial_extension_host_queue.h" |
15 | 17 |
16 namespace extensions { | 18 namespace extensions { |
17 | 19 |
18 ChromeExtensionHostDelegate::ChromeExtensionHostDelegate() {} | 20 ChromeExtensionHostDelegate::ChromeExtensionHostDelegate() {} |
19 | 21 |
20 ChromeExtensionHostDelegate::~ChromeExtensionHostDelegate() {} | 22 ChromeExtensionHostDelegate::~ChromeExtensionHostDelegate() {} |
21 | 23 |
22 void ChromeExtensionHostDelegate::OnExtensionHostCreated( | 24 void ChromeExtensionHostDelegate::OnExtensionHostCreated( |
23 content::WebContents* web_contents) { | 25 content::WebContents* web_contents) { |
24 ChromeExtensionWebContentsObserver::CreateForWebContents(web_contents); | 26 ChromeExtensionWebContentsObserver::CreateForWebContents(web_contents); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 bool ChromeExtensionHostDelegate::CheckMediaAccessPermission( | 61 bool ChromeExtensionHostDelegate::CheckMediaAccessPermission( |
60 content::WebContents* web_contents, | 62 content::WebContents* web_contents, |
61 const GURL& security_origin, | 63 const GURL& security_origin, |
62 content::MediaStreamType type, | 64 content::MediaStreamType type, |
63 const Extension* extension) { | 65 const Extension* extension) { |
64 return MediaCaptureDevicesDispatcher::GetInstance() | 66 return MediaCaptureDevicesDispatcher::GetInstance() |
65 ->CheckMediaAccessPermission( | 67 ->CheckMediaAccessPermission( |
66 web_contents, security_origin, type, extension); | 68 web_contents, security_origin, type, extension); |
67 } | 69 } |
68 | 70 |
| 71 static base::LazyInstance<SerialExtensionHostQueue> g_queue = |
| 72 LAZY_INSTANCE_INITIALIZER; |
| 73 |
| 74 ExtensionHostQueue* ChromeExtensionHostDelegate::GetExtensionHostQueue() const { |
| 75 return g_queue.Pointer(); |
| 76 } |
| 77 |
69 } // namespace extensions | 78 } // namespace extensions |
OLD | NEW |