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 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1615 return; | 1615 return; |
1616 } | 1616 } |
1617 | 1617 |
1618 // Make sure content-setting icon is turned off in case the page does | 1618 // Make sure content-setting icon is turned off in case the page does |
1619 // ungestured and gestured RPH calls. | 1619 // ungestured and gestured RPH calls. |
1620 if (window_) { | 1620 if (window_) { |
1621 tab_content_settings->ClearPendingProtocolHandler(); | 1621 tab_content_settings->ClearPendingProtocolHandler(); |
1622 window_->GetLocationBar()->UpdateContentSettingsIcons(); | 1622 window_->GetLocationBar()->UpdateContentSettingsIcons(); |
1623 } | 1623 } |
1624 | 1624 |
1625 RegisterProtocolHandlerInfoBarDelegate::Create( | 1625 registry->RequestPermission(web_contents, handler); |
koz (OOO until 15th September)
2014/02/06 03:03:26
Better to not add RequestPermission() to ProtocolH
Greg Billock
2014/02/06 22:23:49
This is intended to contain the bubble/infobar spl
koz (OOO until 15th September)
2014/02/06 23:34:10
Yes please. I think it would make more sense to ha
Greg Billock
2014/02/10 23:12:51
Sounds good.
The context is that I've been doing
koz (OOO until 15th September)
2014/02/11 02:17:07
Yeah, it's probably not, but I'd be afraid of more
| |
1626 InfoBarService::FromWebContents(web_contents), registry, handler); | |
1627 } | 1626 } |
1628 | 1627 |
1629 void Browser::UpdatePreferredSize(WebContents* source, | 1628 void Browser::UpdatePreferredSize(WebContents* source, |
1630 const gfx::Size& pref_size) { | 1629 const gfx::Size& pref_size) { |
1631 window_->UpdatePreferredSize(source, pref_size); | 1630 window_->UpdatePreferredSize(source, pref_size); |
1632 } | 1631 } |
1633 | 1632 |
1634 void Browser::ResizeDueToAutoResize(WebContents* source, | 1633 void Browser::ResizeDueToAutoResize(WebContents* source, |
1635 const gfx::Size& new_size) { | 1634 const gfx::Size& new_size) { |
1636 window_->ResizeDueToAutoResize(source, new_size); | 1635 window_->ResizeDueToAutoResize(source, new_size); |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2292 if (contents && !allow_js_access) { | 2291 if (contents && !allow_js_access) { |
2293 contents->web_contents()->GetController().LoadURL( | 2292 contents->web_contents()->GetController().LoadURL( |
2294 target_url, | 2293 target_url, |
2295 content::Referrer(), | 2294 content::Referrer(), |
2296 content::PAGE_TRANSITION_LINK, | 2295 content::PAGE_TRANSITION_LINK, |
2297 std::string()); // No extra headers. | 2296 std::string()); // No extra headers. |
2298 } | 2297 } |
2299 | 2298 |
2300 return contents != NULL; | 2299 return contents != NULL; |
2301 } | 2300 } |
OLD | NEW |