OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/media/media_stream_capture_indicator.h" | 5 #include "chrome/browser/media/media_stream_capture_indicator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 extensions::ExtensionRegistry::Get(web_contents->GetBrowserContext()); | 52 extensions::ExtensionRegistry::Get(web_contents->GetBrowserContext()); |
53 return registry->enabled_extensions().GetExtensionOrAppByURL( | 53 return registry->enabled_extensions().GetExtensionOrAppByURL( |
54 web_contents->GetURL()); | 54 web_contents->GetURL()); |
55 } | 55 } |
56 | 56 |
57 bool IsWhitelistedExtension(const extensions::Extension* extension) { | 57 bool IsWhitelistedExtension(const extensions::Extension* extension) { |
58 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 58 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
59 | 59 |
60 static const char* const kExtensionWhitelist[] = { | 60 static const char* const kExtensionWhitelist[] = { |
61 extension_misc::kHotwordExtensionId, | 61 extension_misc::kHotwordExtensionId, |
| 62 extension_misc::kHotwordNewExtensionId, |
62 }; | 63 }; |
63 | 64 |
64 for (size_t i = 0; i < arraysize(kExtensionWhitelist); ++i) { | 65 for (size_t i = 0; i < arraysize(kExtensionWhitelist); ++i) { |
65 if (extension->id() == kExtensionWhitelist[i]) | 66 if (extension->id() == kExtensionWhitelist[i]) |
66 return true; | 67 return true; |
67 } | 68 } |
68 | 69 |
69 return false; | 70 return false; |
70 } | 71 } |
71 #endif // defined(ENABLE_EXTENSIONS) | 72 #endif // defined(ENABLE_EXTENSIONS) |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 } else if (audio && !video) { | 477 } else if (audio && !video) { |
477 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY; | 478 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY; |
478 *image = *mic_image_; | 479 *image = *mic_image_; |
479 } else if (!audio && video) { | 480 } else if (!audio && video) { |
480 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY; | 481 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY; |
481 *image = *camera_image_; | 482 *image = *camera_image_; |
482 } | 483 } |
483 | 484 |
484 *tool_tip = l10n_util::GetStringUTF16(message_id); | 485 *tool_tip = l10n_util::GetStringUTF16(message_id); |
485 } | 486 } |
OLD | NEW |