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 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1629 // ungestured and gestured RPH calls. | 1629 // ungestured and gestured RPH calls. |
1630 if (window_) { | 1630 if (window_) { |
1631 tab_content_settings->ClearPendingProtocolHandler(); | 1631 tab_content_settings->ClearPendingProtocolHandler(); |
1632 window_->GetLocationBar()->UpdateContentSettingsIcons(); | 1632 window_->GetLocationBar()->UpdateContentSettingsIcons(); |
1633 } | 1633 } |
1634 | 1634 |
1635 PermissionBubbleManager* bubble_manager = | 1635 PermissionBubbleManager* bubble_manager = |
1636 PermissionBubbleManager::FromWebContents(web_contents); | 1636 PermissionBubbleManager::FromWebContents(web_contents); |
1637 if (PermissionBubbleManager::Enabled() && bubble_manager) { | 1637 if (PermissionBubbleManager::Enabled() && bubble_manager) { |
1638 bubble_manager->AddRequest( | 1638 bubble_manager->AddRequest( |
1639 new RegisterProtocolHandlerPermissionRequest(registry, handler)); | 1639 new RegisterProtocolHandlerPermissionRequest(registry, handler, |
| 1640 user_gesture)); |
1640 } else { | 1641 } else { |
1641 RegisterProtocolHandlerInfoBarDelegate::Create( | 1642 RegisterProtocolHandlerInfoBarDelegate::Create( |
1642 InfoBarService::FromWebContents(web_contents), registry, handler); | 1643 InfoBarService::FromWebContents(web_contents), registry, handler); |
1643 } | 1644 } |
1644 } | 1645 } |
1645 | 1646 |
1646 void Browser::UpdatePreferredSize(WebContents* source, | 1647 void Browser::UpdatePreferredSize(WebContents* source, |
1647 const gfx::Size& pref_size) { | 1648 const gfx::Size& pref_size) { |
1648 window_->UpdatePreferredSize(source, pref_size); | 1649 window_->UpdatePreferredSize(source, pref_size); |
1649 } | 1650 } |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2318 if (contents && !allow_js_access) { | 2319 if (contents && !allow_js_access) { |
2319 contents->web_contents()->GetController().LoadURL( | 2320 contents->web_contents()->GetController().LoadURL( |
2320 target_url, | 2321 target_url, |
2321 content::Referrer(), | 2322 content::Referrer(), |
2322 content::PAGE_TRANSITION_LINK, | 2323 content::PAGE_TRANSITION_LINK, |
2323 std::string()); // No extra headers. | 2324 std::string()); // No extra headers. |
2324 } | 2325 } |
2325 | 2326 |
2326 return contents != NULL; | 2327 return contents != NULL; |
2327 } | 2328 } |
OLD | NEW |