| 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 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2290 ShowOptionsTab(std::string()); | 2290 ShowOptionsTab(std::string()); |
| 2291 } else if (SyncPromoUI::ShouldShowSyncPromo(profile()) && | 2291 } else if (SyncPromoUI::ShouldShowSyncPromo(profile()) && |
| 2292 login_service->current_login_ui() == NULL) { | 2292 login_service->current_login_ui() == NULL) { |
| 2293 // There is no currently active login UI, so display a new promo page. | 2293 // There is no currently active login UI, so display a new promo page. |
| 2294 GURL url(SyncPromoUI::GetSyncPromoURL(GURL(), source)); | 2294 GURL url(SyncPromoUI::GetSyncPromoURL(GURL(), source)); |
| 2295 browser::NavigateParams params(GetSingletonTabNavigateParams(GURL(url))); | 2295 browser::NavigateParams params(GetSingletonTabNavigateParams(GURL(url))); |
| 2296 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | 2296 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; |
| 2297 ShowSingletonTabOverwritingNTP(params); | 2297 ShowSingletonTabOverwritingNTP(params); |
| 2298 } else { | 2298 } else { |
| 2299 LoginUIServiceFactory::GetForProfile( | 2299 LoginUIServiceFactory::GetForProfile( |
| 2300 profile()->GetOriginalProfile())->ShowLoginUI(false); | 2300 profile()->GetOriginalProfile())->ShowLoginUI(); |
| 2301 } | 2301 } |
| 2302 } | 2302 } |
| 2303 | 2303 |
| 2304 void Browser::ToggleSpeechInput() { | 2304 void Browser::ToggleSpeechInput() { |
| 2305 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 2305 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
| 2306 } | 2306 } |
| 2307 | 2307 |
| 2308 void Browser::UpdateDownloadShelfVisibility(bool visible) { | 2308 void Browser::UpdateDownloadShelfVisibility(bool visible) { |
| 2309 if (GetStatusBubble()) | 2309 if (GetStatusBubble()) |
| 2310 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); | 2310 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); |
| (...skipping 3189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5500 if (contents && !allow_js_access) { | 5500 if (contents && !allow_js_access) { |
| 5501 contents->web_contents()->GetController().LoadURL( | 5501 contents->web_contents()->GetController().LoadURL( |
| 5502 target_url, | 5502 target_url, |
| 5503 content::Referrer(), | 5503 content::Referrer(), |
| 5504 content::PAGE_TRANSITION_LINK, | 5504 content::PAGE_TRANSITION_LINK, |
| 5505 std::string()); // No extra headers. | 5505 std::string()); // No extra headers. |
| 5506 } | 5506 } |
| 5507 | 5507 |
| 5508 return contents != NULL; | 5508 return contents != NULL; |
| 5509 } | 5509 } |
| OLD | NEW |