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

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

Issue 9390015: Get rid of ShowPageInfo on WebContents and WebContentsDelegate. Chrome shouldn't have to go throu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix gtk+mac Created 8 years, 10 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 3850 matching lines...) Expand 10 before | Expand all | Expand 10 after
3861 DownloadStartedAnimation::Show(shelf_tab); 3861 DownloadStartedAnimation::Show(shelf_tab);
3862 } 3862 }
3863 #endif 3863 #endif
3864 } 3864 }
3865 3865
3866 // If the download occurs in a new tab, close it. 3866 // If the download occurs in a new tab, close it.
3867 if (source->GetController().IsInitialNavigation() && tab_count() > 1) 3867 if (source->GetController().IsInitialNavigation() && tab_count() > 1)
3868 CloseContents(source); 3868 CloseContents(source);
3869 } 3869 }
3870 3870
3871 void Browser::ShowPageInfo(content::BrowserContext* browser_context, 3871 void Browser::ShowPageInfo(const GURL& url,
3872 const GURL& url,
3873 const SSLStatus& ssl, 3872 const SSLStatus& ssl,
3874 bool show_history) { 3873 bool show_history) {
3875 Profile* profile = Profile::FromBrowserContext(browser_context); 3874 window()->ShowPageInfo(profile_, url, ssl, show_history);
3876 window()->ShowPageInfo(profile, url, ssl, show_history);
3877 } 3875 }
3878 3876
3879 void Browser::ViewSourceForTab(WebContents* source, const GURL& page_url) { 3877 void Browser::ViewSourceForTab(WebContents* source, const GURL& page_url) {
3880 DCHECK(source); 3878 DCHECK(source);
3881 TabContentsWrapper* wrapper = GetTabContentsWrapperAt( 3879 TabContentsWrapper* wrapper = GetTabContentsWrapperAt(
3882 tab_handler_->GetTabStripModel()->GetWrapperIndex(source)); 3880 tab_handler_->GetTabStripModel()->GetWrapperIndex(source));
3883 ViewSource(wrapper); 3881 ViewSource(wrapper);
3884 } 3882 }
3885 3883
3886 void Browser::ViewSourceForFrame(WebContents* source, 3884 void Browser::ViewSourceForFrame(WebContents* source,
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
5508 profile()->GetOriginalProfile()); 5506 profile()->GetOriginalProfile());
5509 if (service->HasSyncSetupCompleted()) 5507 if (service->HasSyncSetupCompleted())
5510 ShowOptionsTab(chrome::kPersonalOptionsSubPage); 5508 ShowOptionsTab(chrome::kPersonalOptionsSubPage);
5511 else 5509 else
5512 service->ShowLoginDialog(); 5510 service->ShowLoginDialog();
5513 } 5511 }
5514 5512
5515 void Browser::ToggleSpeechInput() { 5513 void Browser::ToggleSpeechInput() {
5516 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); 5514 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput();
5517 } 5515 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698