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

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

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: slight tweaking for comments Created 9 years, 4 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/webui/chrome_web_ui_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 3395 matching lines...) Expand 10 before | Expand all | Expand 10 after
3406 ui::Animation::ShouldRenderRichAnimation()) { 3406 ui::Animation::ShouldRenderRichAnimation()) {
3407 DownloadStartedAnimation::Show(shelf_tab); 3407 DownloadStartedAnimation::Show(shelf_tab);
3408 } 3408 }
3409 #endif 3409 #endif
3410 3410
3411 // If the download occurs in a new tab, close it. 3411 // If the download occurs in a new tab, close it.
3412 if (source->controller().IsInitialNavigation() && tab_count() > 1) 3412 if (source->controller().IsInitialNavigation() && tab_count() > 1)
3413 CloseContents(source); 3413 CloseContents(source);
3414 } 3414 }
3415 3415
3416 void Browser::ShowPageInfo(Profile* profile, 3416 void Browser::ShowPageInfo(content::BrowserContext* browser_context,
3417 const GURL& url, 3417 const GURL& url,
3418 const NavigationEntry::SSLStatus& ssl, 3418 const NavigationEntry::SSLStatus& ssl,
3419 bool show_history) { 3419 bool show_history) {
3420 Profile* profile = Profile::FromBrowserContext(browser_context);
3420 window()->ShowPageInfo(profile, url, ssl, show_history); 3421 window()->ShowPageInfo(profile, url, ssl, show_history);
3421 } 3422 }
3422 3423
3423 void Browser::ViewSourceForTab(TabContents* source, const GURL& page_url) { 3424 void Browser::ViewSourceForTab(TabContents* source, const GURL& page_url) {
3424 DCHECK(source); 3425 DCHECK(source);
3425 int index = tabstrip_model()->GetWrapperIndex(source); 3426 int index = tabstrip_model()->GetWrapperIndex(source);
3426 TabContentsWrapper* wrapper = tabstrip_model()->GetTabContentsAt(index); 3427 TabContentsWrapper* wrapper = tabstrip_model()->GetTabContentsAt(index);
3427 ViewSource(wrapper); 3428 ViewSource(wrapper);
3428 } 3429 }
3429 3430
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
4802 window_->BookmarkBarStateChanged(animate_type); 4803 window_->BookmarkBarStateChanged(animate_type);
4803 } 4804 }
4804 4805
4805 void Browser::ShowSyncSetup() { 4806 void Browser::ShowSyncSetup() {
4806 ProfileSyncService* service = profile()->GetProfileSyncService(); 4807 ProfileSyncService* service = profile()->GetProfileSyncService();
4807 if (service->HasSyncSetupCompleted()) 4808 if (service->HasSyncSetupCompleted())
4808 ShowOptionsTab(chrome::kSyncSetupSubPage); 4809 ShowOptionsTab(chrome::kSyncSetupSubPage);
4809 else 4810 else
4810 profile()->GetProfileSyncService()->ShowLoginDialog(); 4811 profile()->GetProfileSyncService()->ShowLoginDialog();
4811 } 4812 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/webui/chrome_web_ui_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698