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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 2682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2693 infobar_helper->RemoveInfoBar(infobar); | 2693 infobar_helper->RemoveInfoBar(infobar); |
2694 } else if ("cancel" == action) { | 2694 } else if ("cancel" == action) { |
2695 if (confirm_infobar->Cancel()) | 2695 if (confirm_infobar->Cancel()) |
2696 infobar_helper->RemoveInfoBar(infobar); | 2696 infobar_helper->RemoveInfoBar(infobar); |
2697 } | 2697 } |
2698 reply.SendSuccess(NULL); | 2698 reply.SendSuccess(NULL); |
2699 return; | 2699 return; |
2700 } | 2700 } |
2701 if ("allow" == action || "deny" == action) { | 2701 if ("allow" == action || "deny" == action) { |
2702 MediaStreamInfoBarDelegate* media_stream_infobar; | 2702 MediaStreamInfoBarDelegate* media_stream_infobar; |
2703 if (!(media_stream_infobar = infobar->AsMediaStreamInfobarDelegate())) { | 2703 if (!(media_stream_infobar = infobar->AsMediaStreamInfoBarDelegate())) { |
2704 reply.SendError("Not a media stream infobar."); | 2704 reply.SendError("Not a media stream infobar."); |
2705 return; | 2705 return; |
2706 } | 2706 } |
2707 if ("allow" == action) { | 2707 if ("allow" == action) { |
2708 content::MediaStreamDevices video_devices = | 2708 content::MediaStreamDevices video_devices = |
2709 media_stream_infobar->GetVideoDevices(); | 2709 media_stream_infobar->GetVideoDevices(); |
2710 content::MediaStreamDevices audio_devices = | 2710 content::MediaStreamDevices audio_devices = |
2711 media_stream_infobar->GetAudioDevices(); | 2711 media_stream_infobar->GetAudioDevices(); |
2712 if (video_devices.empty() || audio_devices.empty()) { | 2712 if (video_devices.empty() || audio_devices.empty()) { |
2713 reply.SendError("No available audio/video devices to autoselect."); | 2713 reply.SendError("No available audio/video devices to autoselect."); |
(...skipping 4364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7078 *browser_handle = browser_tracker_->Add(browser); | 7078 *browser_handle = browser_tracker_->Add(browser); |
7079 *success = true; | 7079 *success = true; |
7080 } | 7080 } |
7081 } | 7081 } |
7082 } | 7082 } |
7083 | 7083 |
7084 void TestingAutomationProvider::OnRemoveProvider() { | 7084 void TestingAutomationProvider::OnRemoveProvider() { |
7085 if (g_browser_process) | 7085 if (g_browser_process) |
7086 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 7086 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
7087 } | 7087 } |
OLD | NEW |