OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 // ungestured and gestured RPH calls. | 1651 // ungestured and gestured RPH calls. |
1652 if (window_) { | 1652 if (window_) { |
1653 tab_content_settings->ClearPendingProtocolHandler(); | 1653 tab_content_settings->ClearPendingProtocolHandler(); |
1654 window_->GetLocationBar()->UpdateContentSettingsIcons(); | 1654 window_->GetLocationBar()->UpdateContentSettingsIcons(); |
1655 } | 1655 } |
1656 | 1656 |
1657 PermissionBubbleManager* bubble_manager = | 1657 PermissionBubbleManager* bubble_manager = |
1658 PermissionBubbleManager::FromWebContents(web_contents); | 1658 PermissionBubbleManager::FromWebContents(web_contents); |
1659 if (PermissionBubbleManager::Enabled() && bubble_manager) { | 1659 if (PermissionBubbleManager::Enabled() && bubble_manager) { |
1660 bubble_manager->AddRequest( | 1660 bubble_manager->AddRequest( |
1661 new RegisterProtocolHandlerPermissionRequest(registry, handler)); | 1661 new RegisterProtocolHandlerPermissionRequest(registry, handler, |
| 1662 url, user_gesture)); |
1662 } else { | 1663 } else { |
1663 RegisterProtocolHandlerInfoBarDelegate::Create( | 1664 RegisterProtocolHandlerInfoBarDelegate::Create( |
1664 InfoBarService::FromWebContents(web_contents), registry, handler); | 1665 InfoBarService::FromWebContents(web_contents), registry, handler); |
1665 } | 1666 } |
1666 } | 1667 } |
1667 | 1668 |
1668 void Browser::UpdatePreferredSize(WebContents* source, | 1669 void Browser::UpdatePreferredSize(WebContents* source, |
1669 const gfx::Size& pref_size) { | 1670 const gfx::Size& pref_size) { |
1670 window_->UpdatePreferredSize(source, pref_size); | 1671 window_->UpdatePreferredSize(source, pref_size); |
1671 } | 1672 } |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2350 if (contents && !allow_js_access) { | 2351 if (contents && !allow_js_access) { |
2351 contents->web_contents()->GetController().LoadURL( | 2352 contents->web_contents()->GetController().LoadURL( |
2352 target_url, | 2353 target_url, |
2353 content::Referrer(), | 2354 content::Referrer(), |
2354 content::PAGE_TRANSITION_LINK, | 2355 content::PAGE_TRANSITION_LINK, |
2355 std::string()); // No extra headers. | 2356 std::string()); // No extra headers. |
2356 } | 2357 } |
2357 | 2358 |
2358 return contents != NULL; | 2359 return contents != NULL; |
2359 } | 2360 } |
OLD | NEW |