Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: chrome/browser/media/media_stream_capture_indicator.cc

Issue 992173002: Delete the old hotwording integration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hotword-remove-disable-option
Patch Set: Move old extension ID constant. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <string> 7 #include <string>
8 8
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 extensions::ExtensionRegistry* registry = 50 extensions::ExtensionRegistry* registry =
51 extensions::ExtensionRegistry::Get(web_contents->GetBrowserContext()); 51 extensions::ExtensionRegistry::Get(web_contents->GetBrowserContext());
52 return registry->enabled_extensions().GetExtensionOrAppByURL( 52 return registry->enabled_extensions().GetExtensionOrAppByURL(
53 web_contents->GetURL()); 53 web_contents->GetURL());
54 } 54 }
55 55
56 bool IsWhitelistedExtension(const extensions::Extension* extension) { 56 bool IsWhitelistedExtension(const extensions::Extension* extension) {
57 DCHECK_CURRENTLY_ON(BrowserThread::UI); 57 DCHECK_CURRENTLY_ON(BrowserThread::UI);
58 58
59 static const char* const kExtensionWhitelist[] = { 59 static const char* const kExtensionWhitelist[] = {
60 extension_misc::kHotwordExtensionId,
61 extension_misc::kHotwordNewExtensionId, 60 extension_misc::kHotwordNewExtensionId,
miu 2015/03/20 04:43:50 Out of curiosity, why is/should the hotword extens
62 }; 61 };
63 62
64 for (size_t i = 0; i < arraysize(kExtensionWhitelist); ++i) { 63 for (size_t i = 0; i < arraysize(kExtensionWhitelist); ++i) {
65 if (extension->id() == kExtensionWhitelist[i]) 64 if (extension->id() == kExtensionWhitelist[i])
66 return true; 65 return true;
67 } 66 }
68 67
69 return false; 68 return false;
70 } 69 }
71 #endif // defined(ENABLE_EXTENSIONS) 70 #endif // defined(ENABLE_EXTENSIONS)
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } else if (audio && !video) { 466 } else if (audio && !video) {
468 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY; 467 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY;
469 *image = *mic_image_; 468 *image = *mic_image_;
470 } else if (!audio && video) { 469 } else if (!audio && video) {
471 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY; 470 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY;
472 *image = *camera_image_; 471 *image = *camera_image_;
473 } 472 }
474 473
475 *tool_tip = l10n_util::GetStringUTF16(message_id); 474 *tool_tip = l10n_util::GetStringUTF16(message_id);
476 } 475 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698