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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1108 infobar_helper->ReplaceInfoBar(old_infobar, infobar); | 1108 infobar_helper->ReplaceInfoBar(old_infobar, infobar); |
1109 else | 1109 else |
1110 infobar_helper->AddInfoBar(infobar); | 1110 infobar_helper->AddInfoBar(infobar); |
1111 #elif defined(OS_LINUX) || defined(OS_MACOSX) | 1111 #elif defined(OS_LINUX) || defined(OS_MACOSX) |
1112 // TODO(macourteau): UI is not implemented yet for Linux and OS X. Fallback to | 1112 // TODO(macourteau): UI is not implemented yet for Linux and OS X. Fallback to |
1113 // the default behaviour and allow access to the first device of each | 1113 // the default behaviour and allow access to the first device of each |
1114 // requested type. | 1114 // requested type. |
1115 content::MediaStreamDevices devices; | 1115 content::MediaStreamDevices devices; |
1116 for (content::MediaStreamDeviceMap::const_iterator it = | 1116 for (content::MediaStreamDeviceMap::const_iterator it = |
1117 request->devices.begin(); it != request->devices.end(); ++it) { | 1117 request->devices.begin(); it != request->devices.end(); ++it) { |
1118 devices.push_back(*it->second.begin()); | 1118 if (it->second.size() > 0) { |
Alexei Svitkine (slow)
2012/03/01 15:48:23
Check !it->second.empty() instead. Also, you don't
macourteau
2012/03/01 15:52:21
Done.
| |
1119 devices.push_back(*it->second.begin()); | |
1120 } | |
1119 } | 1121 } |
1120 | 1122 |
1121 callback.Run(devices); | 1123 callback.Run(devices); |
1122 #endif // TOOLKIT_VIEWS | 1124 #endif // TOOLKIT_VIEWS |
1123 } | 1125 } |
1124 | 1126 |
1125 void ChromeContentBrowserClient::RequestDesktopNotificationPermission( | 1127 void ChromeContentBrowserClient::RequestDesktopNotificationPermission( |
1126 const GURL& source_origin, | 1128 const GURL& source_origin, |
1127 int callback_context, | 1129 int callback_context, |
1128 int render_process_id, | 1130 int render_process_id, |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1534 #if defined(USE_NSS) | 1536 #if defined(USE_NSS) |
1535 crypto::CryptoModuleBlockingPasswordDelegate* | 1537 crypto::CryptoModuleBlockingPasswordDelegate* |
1536 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1538 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
1537 const GURL& url) { | 1539 const GURL& url) { |
1538 return browser::NewCryptoModuleBlockingDialogDelegate( | 1540 return browser::NewCryptoModuleBlockingDialogDelegate( |
1539 browser::kCryptoModulePasswordKeygen, url.host()); | 1541 browser::kCryptoModulePasswordKeygen, url.host()); |
1540 } | 1542 } |
1541 #endif | 1543 #endif |
1542 | 1544 |
1543 } // namespace chrome | 1545 } // namespace chrome |
OLD | NEW |