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

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

Issue 10703061: chrome/browser/ui: Put browser_dialogs.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 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 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 void Browser::ViewSourceForFrame(WebContents* source, 1722 void Browser::ViewSourceForFrame(WebContents* source,
1723 const GURL& frame_url, 1723 const GURL& frame_url,
1724 const std::string& frame_content_state) { 1724 const std::string& frame_content_state) {
1725 DCHECK(source); 1725 DCHECK(source);
1726 TabContents* tab_contents = chrome::GetTabContentsAt(this, 1726 TabContents* tab_contents = chrome::GetTabContentsAt(this,
1727 tab_strip_model_->GetIndexOfWebContents(source)); 1727 tab_strip_model_->GetIndexOfWebContents(source));
1728 chrome::ViewSource(this, tab_contents, frame_url, frame_content_state); 1728 chrome::ViewSource(this, tab_contents, frame_url, frame_content_state);
1729 } 1729 }
1730 1730
1731 void Browser::ShowRepostFormWarningDialog(WebContents* source) { 1731 void Browser::ShowRepostFormWarningDialog(WebContents* source) {
1732 browser::ShowTabModalConfirmDialog( 1732 chrome::ShowTabModalConfirmDialog(new RepostFormWarningController(source),
1733 new RepostFormWarningController(source), 1733 TabContents::FromWebContents(source));
1734 TabContents::FromWebContents(source));
1735 } 1734 }
1736 1735
1737 bool Browser::ShouldAddNavigationToHistory( 1736 bool Browser::ShouldAddNavigationToHistory(
1738 const history::HistoryAddPageArgs& add_page_args, 1737 const history::HistoryAddPageArgs& add_page_args,
1739 content::NavigationType navigation_type) { 1738 content::NavigationType navigation_type) {
1740 // Don't update history if running as app. 1739 // Don't update history if running as app.
1741 return !IsApplication(); 1740 return !IsApplication();
1742 } 1741 }
1743 1742
1744 bool Browser::ShouldCreateWebContents( 1743 bool Browser::ShouldCreateWebContents(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 printing::PrintPreviewTabController::GetInstance(); 1791 printing::PrintPreviewTabController::GetInstance();
1793 if (controller) { 1792 if (controller) {
1794 TabContents* preview_tab = 1793 TabContents* preview_tab =
1795 controller->GetPrintPreviewForTab(tab_contents); 1794 controller->GetPrintPreviewForTab(tab_contents);
1796 if (preview_tab && preview_tab != tab_contents) { 1795 if (preview_tab && preview_tab != tab_contents) {
1797 return; 1796 return;
1798 } 1797 }
1799 } 1798 }
1800 } 1799 }
1801 1800
1802 browser::ShowHungRendererDialog(source); 1801 chrome::ShowHungRendererDialog(source);
1803 } 1802 }
1804 1803
1805 void Browser::RendererResponsive(WebContents* source) { 1804 void Browser::RendererResponsive(WebContents* source) {
1806 browser::HideHungRendererDialog(source); 1805 chrome::HideHungRendererDialog(source);
1807 } 1806 }
1808 1807
1809 void Browser::WorkerCrashed(WebContents* source) { 1808 void Browser::WorkerCrashed(WebContents* source) {
1810 TabContents* tab_contents = TabContents::FromWebContents(source); 1809 TabContents* tab_contents = TabContents::FromWebContents(source);
1811 InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper(); 1810 InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper();
1812 infobar_helper->AddInfoBar(new SimpleAlertInfoBarDelegate( 1811 infobar_helper->AddInfoBar(new SimpleAlertInfoBarDelegate(
1813 infobar_helper, 1812 infobar_helper,
1814 NULL, 1813 NULL,
1815 l10n_util::GetStringUTF16(IDS_WEBWORKER_CRASHED_PROMPT), 1814 l10n_util::GetStringUTF16(IDS_WEBWORKER_CRASHED_PROMPT),
1816 true)); 1815 true));
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 if (contents && !allow_js_access) { 2815 if (contents && !allow_js_access) {
2817 contents->web_contents()->GetController().LoadURL( 2816 contents->web_contents()->GetController().LoadURL(
2818 target_url, 2817 target_url,
2819 content::Referrer(), 2818 content::Referrer(),
2820 content::PAGE_TRANSITION_LINK, 2819 content::PAGE_TRANSITION_LINK,
2821 std::string()); // No extra headers. 2820 std::string()); // No extra headers.
2822 } 2821 }
2823 2822
2824 return contents != NULL; 2823 return contents != NULL;
2825 } 2824 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud.cc ('k') | chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698