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

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: browser_context Created 9 years, 5 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) 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 3383 matching lines...) Expand 10 before | Expand all | Expand 10 after
3394 ui::Animation::ShouldRenderRichAnimation()) { 3394 ui::Animation::ShouldRenderRichAnimation()) {
3395 DownloadStartedAnimation::Show(shelf_tab); 3395 DownloadStartedAnimation::Show(shelf_tab);
3396 } 3396 }
3397 #endif 3397 #endif
3398 3398
3399 // If the download occurs in a new tab, close it. 3399 // If the download occurs in a new tab, close it.
3400 if (source->controller().IsInitialNavigation() && tab_count() > 1) 3400 if (source->controller().IsInitialNavigation() && tab_count() > 1)
3401 CloseContents(source); 3401 CloseContents(source);
3402 } 3402 }
3403 3403
3404 void Browser::ShowPageInfo(Profile* profile, 3404 void Browser::ShowPageInfo(content::BrowserContext* browser_context,
3405 const GURL& url, 3405 const GURL& url,
3406 const NavigationEntry::SSLStatus& ssl, 3406 const NavigationEntry::SSLStatus& ssl,
3407 bool show_history) { 3407 bool show_history) {
3408 Profile* profile = static_cast<Profile*>(browser_context);
3408 window()->ShowPageInfo(profile, url, ssl, show_history); 3409 window()->ShowPageInfo(profile, url, ssl, show_history);
3409 } 3410 }
3410 3411
3411 void Browser::ViewSourceForTab(TabContents* source, const GURL& page_url) { 3412 void Browser::ViewSourceForTab(TabContents* source, const GURL& page_url) {
3412 DCHECK(source); 3413 DCHECK(source);
3413 int index = tabstrip_model()->GetWrapperIndex(source); 3414 int index = tabstrip_model()->GetWrapperIndex(source);
3414 TabContentsWrapper* wrapper = tabstrip_model()->GetTabContentsAt(index); 3415 TabContentsWrapper* wrapper = tabstrip_model()->GetTabContentsAt(index);
3415 ViewSource(wrapper); 3416 ViewSource(wrapper);
3416 } 3417 }
3417 3418
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
4793 window_->BookmarkBarStateChanged(animate_type); 4794 window_->BookmarkBarStateChanged(animate_type);
4794 } 4795 }
4795 4796
4796 void Browser::ShowSyncSetup() { 4797 void Browser::ShowSyncSetup() {
4797 ProfileSyncService* service = profile()->GetProfileSyncService(); 4798 ProfileSyncService* service = profile()->GetProfileSyncService();
4798 if (service->HasSyncSetupCompleted()) 4799 if (service->HasSyncSetupCompleted())
4799 ShowOptionsTab(chrome::kSyncSetupSubPage); 4800 ShowOptionsTab(chrome::kSyncSetupSubPage);
4800 else 4801 else
4801 profile()->GetProfileSyncService()->ShowLoginDialog(); 4802 profile()->GetProfileSyncService()->ShowLoginDialog();
4802 } 4803 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698