| 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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 TabContentsWrapper* tab = | 1124 TabContentsWrapper* tab = |
| 1125 TabContentsWrapper::GetCurrentWrapperForContents(contents); | 1125 TabContentsWrapper::GetCurrentWrapperForContents(contents); |
| 1126 DCHECK(tab); | 1126 DCHECK(tab); |
| 1127 | 1127 |
| 1128 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper(); | 1128 InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper(); |
| 1129 InfoBarDelegate* old_infobar = NULL; | 1129 InfoBarDelegate* old_infobar = NULL; |
| 1130 for (size_t i = 0; i < infobar_helper->infobar_count() && !old_infobar; ++i) { | 1130 for (size_t i = 0; i < infobar_helper->infobar_count() && !old_infobar; ++i) { |
| 1131 old_infobar = | 1131 old_infobar = |
| 1132 infobar_helper->GetInfoBarDelegateAt(i)->AsMediaStreamInfobarDelegate(); | 1132 infobar_helper->GetInfoBarDelegateAt(i)->AsMediaStreamInfoBarDelegate(); |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 #if defined(TOOLKIT_VIEWS) || defined(OS_LINUX) | 1135 #if defined(TOOLKIT_VIEWS) || defined(OS_LINUX) |
| 1136 InfoBarDelegate* infobar = new MediaStreamInfoBarDelegate(infobar_helper, | 1136 InfoBarDelegate* infobar = new MediaStreamInfoBarDelegate(infobar_helper, |
| 1137 request, | 1137 request, |
| 1138 callback); | 1138 callback); |
| 1139 if (old_infobar) | 1139 if (old_infobar) |
| 1140 infobar_helper->ReplaceInfoBar(old_infobar, infobar); | 1140 infobar_helper->ReplaceInfoBar(old_infobar, infobar); |
| 1141 else | 1141 else |
| 1142 infobar_helper->AddInfoBar(infobar); | 1142 infobar_helper->AddInfoBar(infobar); |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 #if defined(USE_NSS) | 1631 #if defined(USE_NSS) |
| 1632 crypto::CryptoModuleBlockingPasswordDelegate* | 1632 crypto::CryptoModuleBlockingPasswordDelegate* |
| 1633 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1633 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 1634 const GURL& url) { | 1634 const GURL& url) { |
| 1635 return browser::NewCryptoModuleBlockingDialogDelegate( | 1635 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 1636 browser::kCryptoModulePasswordKeygen, url.host()); | 1636 browser::kCryptoModulePasswordKeygen, url.host()); |
| 1637 } | 1637 } |
| 1638 #endif | 1638 #endif |
| 1639 | 1639 |
| 1640 } // namespace chrome | 1640 } // namespace chrome |
| OLD | NEW |