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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 } | 42 } |
43 | 43 |
44 return &(*devices.begin()); | 44 return &(*devices.begin()); |
45 }; | 45 }; |
46 | 46 |
47 // This is a short-term solution to allow testing of the the Screen Capture API | 47 // This is a short-term solution to allow testing of the the Screen Capture API |
48 // with Google Hangouts in M27. | 48 // with Google Hangouts in M27. |
49 // TODO(sergeyu): Remove this whitelist as soon as possible. | 49 // TODO(sergeyu): Remove this whitelist as soon as possible. |
50 bool IsOriginWhitelistedForScreenCapture(const GURL& origin) { | 50 bool IsOriginWhitelistedForScreenCapture(const GURL& origin) { |
51 #if defined(OFFICIAL_BUILD) | 51 #if defined(OFFICIAL_BUILD) |
52 return origin.spec() == "https://staging.talkgadget.google.com/" || | 52 return |
53 origin.spec() == "https://plus.google.com/"; | 53 // Google Hangouts. |
| 54 origin.spec() == "https://staging.talkgadget.google.com/" || |
| 55 origin.spec() == "https://plus.google.com/" || |
| 56 // CV. |
| 57 origin.spec() == "chrome-extension://pkedcjkdefgpdelpbcmbmeomcjbeemfm/" || |
| 58 // CV Staging. |
| 59 origin.spec() == "chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/" || |
| 60 // CV Canary. |
| 61 origin.spec() == "chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/"; |
54 #else | 62 #else |
55 return false; | 63 return false; |
56 #endif | 64 #endif |
57 } | 65 } |
58 | 66 |
59 } // namespace | 67 } // namespace |
60 | 68 |
61 MediaCaptureDevicesDispatcher* MediaCaptureDevicesDispatcher::GetInstance() { | 69 MediaCaptureDevicesDispatcher* MediaCaptureDevicesDispatcher::GetInstance() { |
62 return Singleton<MediaCaptureDevicesDispatcher>::get(); | 70 return Singleton<MediaCaptureDevicesDispatcher>::get(); |
63 } | 71 } |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 int render_process_id, | 302 int render_process_id, |
295 int render_view_id, | 303 int render_view_id, |
296 const content::MediaStreamDevice& device, | 304 const content::MediaStreamDevice& device, |
297 content::MediaRequestState state) { | 305 content::MediaRequestState state) { |
298 FOR_EACH_OBSERVER(Observer, observers_, | 306 FOR_EACH_OBSERVER(Observer, observers_, |
299 OnRequestUpdate(render_process_id, | 307 OnRequestUpdate(render_process_id, |
300 render_view_id, | 308 render_view_id, |
301 device, | 309 device, |
302 state)); | 310 state)); |
303 } | 311 } |
OLD | NEW |