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

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

Issue 607603002: [Athena] Tempolarily exclude extensions API that are causing crash on Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_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/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 } 647 }
648 648
649 void MediaCaptureDevicesDispatcher::ProcessTabCaptureAccessRequest( 649 void MediaCaptureDevicesDispatcher::ProcessTabCaptureAccessRequest(
650 content::WebContents* web_contents, 650 content::WebContents* web_contents,
651 const content::MediaStreamRequest& request, 651 const content::MediaStreamRequest& request,
652 const content::MediaResponseCallback& callback, 652 const content::MediaResponseCallback& callback,
653 const extensions::Extension* extension) { 653 const extensions::Extension* extension) {
654 content::MediaStreamDevices devices; 654 content::MediaStreamDevices devices;
655 scoped_ptr<content::MediaStreamUI> ui; 655 scoped_ptr<content::MediaStreamUI> ui;
656 656
657 #if defined(ENABLE_EXTENSIONS) 657 #if defined(ENABLE_EXTENSIONS) && !defined(USE_ATHENA)
658 Profile* profile = 658 Profile* profile =
659 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 659 Profile::FromBrowserContext(web_contents->GetBrowserContext());
660 extensions::TabCaptureRegistry* tab_capture_registry = 660 extensions::TabCaptureRegistry* tab_capture_registry =
661 extensions::TabCaptureRegistry::Get(profile); 661 extensions::TabCaptureRegistry::Get(profile);
662 if (!tab_capture_registry) { 662 if (!tab_capture_registry) {
663 NOTREACHED(); 663 NOTREACHED();
664 callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, ui.Pass()); 664 callback.Run(devices, content::MEDIA_DEVICE_INVALID_STATE, ui.Pass());
665 return; 665 return;
666 } 666 }
667 const bool tab_capture_allowed = tab_capture_registry->VerifyRequest( 667 const bool tab_capture_allowed = tab_capture_registry->VerifyRequest(
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 1086
1087 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( 1087 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices(
1088 const MediaStreamDevices& devices) { 1088 const MediaStreamDevices& devices) {
1089 test_audio_devices_ = devices; 1089 test_audio_devices_ = devices;
1090 } 1090 }
1091 1091
1092 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( 1092 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices(
1093 const MediaStreamDevices& devices) { 1093 const MediaStreamDevices& devices) {
1094 test_video_devices_ = devices; 1094 test_video_devices_ = devices;
1095 } 1095 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/browser_context_keyed_service_factories.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698