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_extension_host_delegate.h" | 5 #include "extensions/shell/browser/shell_extension_host_delegate.h" |
6 | 6 |
| 7 #include "base/lazy_instance.h" |
7 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "extensions/browser/serial_extension_host_queue.h" |
8 #include "extensions/shell/browser/media_capture_util.h" | 10 #include "extensions/shell/browser/media_capture_util.h" |
9 #include "extensions/shell/browser/shell_extension_web_contents_observer.h" | 11 #include "extensions/shell/browser/shell_extension_web_contents_observer.h" |
10 | 12 |
11 namespace extensions { | 13 namespace extensions { |
12 | 14 |
13 ShellExtensionHostDelegate::ShellExtensionHostDelegate() { | 15 ShellExtensionHostDelegate::ShellExtensionHostDelegate() { |
14 } | 16 } |
15 | 17 |
16 ShellExtensionHostDelegate::~ShellExtensionHostDelegate() { | 18 ShellExtensionHostDelegate::~ShellExtensionHostDelegate() { |
17 } | 19 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 56 |
55 bool ShellExtensionHostDelegate::CheckMediaAccessPermission( | 57 bool ShellExtensionHostDelegate::CheckMediaAccessPermission( |
56 content::WebContents* web_contents, | 58 content::WebContents* web_contents, |
57 const GURL& security_origin, | 59 const GURL& security_origin, |
58 content::MediaStreamType type, | 60 content::MediaStreamType type, |
59 const Extension* extension) { | 61 const Extension* extension) { |
60 media_capture_util::VerifyMediaAccessPermission(type, extension); | 62 media_capture_util::VerifyMediaAccessPermission(type, extension); |
61 return true; | 63 return true; |
62 } | 64 } |
63 | 65 |
| 66 static base::LazyInstance<SerialExtensionHostQueue> g_queue = |
| 67 LAZY_INSTANCE_INITIALIZER; |
| 68 |
| 69 ExtensionHostQueue* ShellExtensionHostDelegate::GetExtensionHostQueue() const { |
| 70 return g_queue.Pointer(); |
| 71 } |
| 72 |
64 } // namespace extensions | 73 } // namespace extensions |
OLD | NEW |