| 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_capture_devices_dispatcher.h" | 5 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 6 | 6 |
| 7 #include "apps/app_window.h" | 7 #include "apps/app_window.h" |
| 8 #include "apps/app_window_registry.h" | 8 #include "apps/app_window_registry.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool IsBuiltInExtension(const GURL& origin) { | 112 bool IsBuiltInExtension(const GURL& origin) { |
| 113 return | 113 return |
| 114 // Feedback Extension. | 114 // Feedback Extension. |
| 115 origin.spec() == "chrome-extension://gfdkimpbcpahaombhbimeihdjnejgicl/"; | 115 origin.spec() == "chrome-extension://gfdkimpbcpahaombhbimeihdjnejgicl/"; |
| 116 } | 116 } |
| 117 | 117 |
| 118 // Returns true of the security origin is associated with casting. | 118 // Returns true of the security origin is associated with casting. |
| 119 bool IsOriginForCasting(const GURL& origin) { | 119 bool IsOriginForCasting(const GURL& origin) { |
| 120 #if defined(OFFICIAL_BUILD) | |
| 121 // Whitelisted tab casting extensions. | 120 // Whitelisted tab casting extensions. |
| 122 return | 121 return |
| 123 // Dev | 122 // Dev |
| 124 origin.spec() == "chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/" || | 123 origin.spec() == "chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/" || |
| 125 // Canary | 124 // Canary |
| 126 origin.spec() == "chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/" || | 125 origin.spec() == "chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/" || |
| 127 // Beta (internal) | 126 // Beta (internal) |
| 128 origin.spec() == "chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/" || | 127 origin.spec() == "chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/" || |
| 129 // Google Cast Beta | 128 // Google Cast Beta |
| 130 origin.spec() == "chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/" || | 129 origin.spec() == "chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/" || |
| 131 // Google Cast Stable | 130 // Google Cast Stable |
| 132 origin.spec() == "chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/"; | 131 origin.spec() == "chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/"; |
| 133 #else | |
| 134 return false; | |
| 135 #endif | |
| 136 } | 132 } |
| 137 | 133 |
| 138 // Helper to get title of the calling application shown in the screen capture | 134 // Helper to get title of the calling application shown in the screen capture |
| 139 // notification. | 135 // notification. |
| 140 base::string16 GetApplicationTitle(content::WebContents* web_contents, | 136 base::string16 GetApplicationTitle(content::WebContents* web_contents, |
| 141 const extensions::Extension* extension) { | 137 const extensions::Extension* extension) { |
| 142 // Use extension name as title for extensions and host/origin for drive-by | 138 // Use extension name as title for extensions and host/origin for drive-by |
| 143 // web. | 139 // web. |
| 144 std::string title; | 140 std::string title; |
| 145 if (extension) { | 141 if (extension) { |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 | 966 |
| 971 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( | 967 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( |
| 972 const MediaStreamDevices& devices) { | 968 const MediaStreamDevices& devices) { |
| 973 test_audio_devices_ = devices; | 969 test_audio_devices_ = devices; |
| 974 } | 970 } |
| 975 | 971 |
| 976 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( | 972 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( |
| 977 const MediaStreamDevices& devices) { | 973 const MediaStreamDevices& devices) { |
| 978 test_video_devices_ = devices; | 974 test_video_devices_ = devices; |
| 979 } | 975 } |
| OLD | NEW |