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

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

Issue 884773003: Hide the taskbar microphone indicator for hotwording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, 60 extension_misc::kHotwordExtensionId,
61 extension_misc::kHotwordNewExtensionId,
61 }; 62 };
62 63
63 for (size_t i = 0; i < arraysize(kExtensionWhitelist); ++i) { 64 for (size_t i = 0; i < arraysize(kExtensionWhitelist); ++i) {
64 if (extension->id() == kExtensionWhitelist[i]) 65 if (extension->id() == kExtensionWhitelist[i])
65 return true; 66 return true;
66 } 67 }
67 68
68 return false; 69 return false;
69 } 70 }
70 #endif // defined(ENABLE_EXTENSIONS) 71 #endif // defined(ENABLE_EXTENSIONS)
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 } else if (audio && !video) { 467 } else if (audio && !video) {
467 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY; 468 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY;
468 *image = *mic_image_; 469 *image = *mic_image_;
469 } else if (!audio && video) { 470 } else if (!audio && video) {
470 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY; 471 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY;
471 *image = *camera_image_; 472 *image = *camera_image_;
472 } 473 }
473 474
474 *tool_tip = l10n_util::GetStringUTF16(message_id); 475 *tool_tip = l10n_util::GetStringUTF16(message_id);
475 } 476 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698