Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 10192005: Refactor LoginUIService to not rely on WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_global_error_unittest.cc ('k') | chrome/browser/ui/sync/one_click_signin_sync_starter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698