| 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/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 // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1577 bool show_history) { | 1577 bool show_history) { |
| 1578 Profile* profile = Profile::FromBrowserContext( | 1578 Profile* profile = Profile::FromBrowserContext( |
| 1579 web_contents->GetBrowserContext()); | 1579 web_contents->GetBrowserContext()); |
| 1580 TabContents* tab_contents = TabContents::FromWebContents(web_contents); | 1580 TabContents* tab_contents = TabContents::FromWebContents(web_contents); |
| 1581 | 1581 |
| 1582 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1582 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 1583 switches::kEnableWebsiteSettings)) { | 1583 switches::kEnableWebsiteSettings)) { |
| 1584 window()->ShowWebsiteSettings( | 1584 window()->ShowWebsiteSettings( |
| 1585 profile, tab_contents, url, ssl, show_history); | 1585 profile, tab_contents, url, ssl, show_history); |
| 1586 } else { | 1586 } else { |
| 1587 window()->ShowPageInfo(profile, url, ssl, show_history); | 1587 window()->ShowPageInfo(web_contents, url, ssl, show_history); |
| 1588 } | 1588 } |
| 1589 } | 1589 } |
| 1590 | 1590 |
| 1591 void Browser::ShowChromeToMobileBubble() { | 1591 void Browser::ShowChromeToMobileBubble() { |
| 1592 // Only show the bubble if the window is active, otherwise we may get into | 1592 // Only show the bubble if the window is active, otherwise we may get into |
| 1593 // weird situations where the bubble is deleted as soon as it is shown. | 1593 // weird situations where the bubble is deleted as soon as it is shown. |
| 1594 if (window_->IsActive()) | 1594 if (window_->IsActive()) |
| 1595 window_->ShowChromeToMobileBubble(); | 1595 window_->ShowChromeToMobileBubble(); |
| 1596 } | 1596 } |
| 1597 | 1597 |
| (...skipping 3627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5225 if (contents && !allow_js_access) { | 5225 if (contents && !allow_js_access) { |
| 5226 contents->web_contents()->GetController().LoadURL( | 5226 contents->web_contents()->GetController().LoadURL( |
| 5227 target_url, | 5227 target_url, |
| 5228 content::Referrer(), | 5228 content::Referrer(), |
| 5229 content::PAGE_TRANSITION_LINK, | 5229 content::PAGE_TRANSITION_LINK, |
| 5230 std::string()); // No extra headers. | 5230 std::string()); // No extra headers. |
| 5231 } | 5231 } |
| 5232 | 5232 |
| 5233 return contents != NULL; | 5233 return contents != NULL; |
| 5234 } | 5234 } |
| OLD | NEW |