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

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: works now 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 3373 matching lines...) Expand 10 before | Expand all | Expand 10 after
3384 ui::Animation::ShouldRenderRichAnimation()) { 3384 ui::Animation::ShouldRenderRichAnimation()) {
3385 DownloadStartedAnimation::Show(shelf_tab); 3385 DownloadStartedAnimation::Show(shelf_tab);
3386 } 3386 }
3387 #endif 3387 #endif
3388 3388
3389 // If the download occurs in a new tab, close it. 3389 // If the download occurs in a new tab, close it.
3390 if (source->controller().IsInitialNavigation() && tab_count() > 1) 3390 if (source->controller().IsInitialNavigation() && tab_count() > 1)
3391 CloseContents(source); 3391 CloseContents(source);
3392 } 3392 }
3393 3393
3394 void Browser::ShowPageInfo(Profile* profile, 3394 void Browser::ShowPageInfo(content::BrowserContext* context,
3395 const GURL& url, 3395 const GURL& url,
3396 const NavigationEntry::SSLStatus& ssl, 3396 const NavigationEntry::SSLStatus& ssl,
3397 bool show_history) { 3397 bool show_history) {
3398 Profile* profile = static_cast<Profile*>(context);
3398 window()->ShowPageInfo(profile, url, ssl, show_history); 3399 window()->ShowPageInfo(profile, url, ssl, show_history);
3399 } 3400 }
3400 3401
3401 void Browser::ViewSourceForTab(TabContents* source, const GURL& page_url) { 3402 void Browser::ViewSourceForTab(TabContents* source, const GURL& page_url) {
3402 DCHECK(source); 3403 DCHECK(source);
3403 int index = tabstrip_model()->GetWrapperIndex(source); 3404 int index = tabstrip_model()->GetWrapperIndex(source);
3404 TabContentsWrapper* wrapper = tabstrip_model()->GetTabContentsAt(index); 3405 TabContentsWrapper* wrapper = tabstrip_model()->GetTabContentsAt(index);
3405 ViewSource(wrapper); 3406 ViewSource(wrapper);
3406 } 3407 }
3407 3408
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
4783 window_->BookmarkBarStateChanged(animate_type); 4784 window_->BookmarkBarStateChanged(animate_type);
4784 } 4785 }
4785 4786
4786 void Browser::ShowSyncSetup() { 4787 void Browser::ShowSyncSetup() {
4787 ProfileSyncService* service = profile()->GetProfileSyncService(); 4788 ProfileSyncService* service = profile()->GetProfileSyncService();
4788 if (service->HasSyncSetupCompleted()) 4789 if (service->HasSyncSetupCompleted())
4789 ShowOptionsTab(chrome::kSyncSetupSubPage); 4790 ShowOptionsTab(chrome::kSyncSetupSubPage);
4790 else 4791 else
4791 profile()->GetProfileSyncService()->ShowLoginDialog(); 4792 profile()->GetProfileSyncService()->ShowLoginDialog();
4792 } 4793 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698