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

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

Issue 6293018: Fix DOMUI pref mode handling of Mac menu items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 11 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') | no next file » | 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 <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 browser->OpenHelpTab(); 678 browser->OpenHelpTab();
679 browser->window()->Show(); 679 browser->window()->Show();
680 } 680 }
681 681
682 // static 682 // static
683 void Browser::OpenOptionsWindow(Profile* profile) { 683 void Browser::OpenOptionsWindow(Profile* profile) {
684 Browser* browser = Browser::Create(profile); 684 Browser* browser = Browser::Create(profile);
685 browser->ShowOptionsTab(chrome::kDefaultOptionsSubPage); 685 browser->ShowOptionsTab(chrome::kDefaultOptionsSubPage);
686 browser->window()->Show(); 686 browser->window()->Show();
687 } 687 }
688
689 // static
690 void Browser::OpenClearBrowingDataDialogWindow(Profile* profile) {
691 Browser* browser = Browser::Create(profile);
692 browser->OpenClearBrowsingDataDialog();
693 browser->window()->Show();
694 }
695
696 // static
697 void Browser::OpenImportSettingsDialogWindow(Profile* profile) {
698 Browser* browser = Browser::Create(profile);
699 browser->OpenImportSettingsDialog();
700 browser->window()->Show();
701 }
688 #endif 702 #endif
689 703
690 // static 704 // static
691 void Browser::OpenExtensionsWindow(Profile* profile) { 705 void Browser::OpenExtensionsWindow(Profile* profile) {
692 Browser* browser = Browser::Create(profile); 706 Browser* browser = Browser::Create(profile);
693 browser->ShowExtensionsTab(); 707 browser->ShowExtensionsTab();
694 browser->window()->Show(); 708 browser->window()->Show();
695 } 709 }
696 710
697 711
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1836 ShowOptionsTab( 1850 ShowOptionsTab(
1837 chrome::kPersonalOptionsSubPage + std::string(kHashMark) + 1851 chrome::kPersonalOptionsSubPage + std::string(kHashMark) +
1838 chrome::kImportDataSubPage); 1852 chrome::kImportDataSubPage);
1839 } else { 1853 } else {
1840 window_->ShowImportDialog(); 1854 window_->ShowImportDialog();
1841 } 1855 }
1842 } 1856 }
1843 1857
1844 void Browser::OpenSyncMyBookmarksDialog() { 1858 void Browser::OpenSyncMyBookmarksDialog() {
1845 sync_ui_util::OpenSyncMyBookmarksDialog( 1859 sync_ui_util::OpenSyncMyBookmarksDialog(
1846 profile_, ProfileSyncService::START_FROM_WRENCH); 1860 profile_, this, ProfileSyncService::START_FROM_WRENCH);
1847 } 1861 }
1848 1862
1849 void Browser::OpenAboutChromeDialog() { 1863 void Browser::OpenAboutChromeDialog() {
1850 UserMetrics::RecordAction(UserMetricsAction("AboutChrome"), profile_); 1864 UserMetrics::RecordAction(UserMetricsAction("AboutChrome"), profile_);
1851 #if defined(OS_CHROMEOS) 1865 #if defined(OS_CHROMEOS)
1852 ShowSingletonTab(GURL(chrome::kChromeUIAboutURL), false); 1866 ShowSingletonTab(GURL(chrome::kChromeUIAboutURL), false);
1853 #else 1867 #else
1854 window_->ShowAboutChromeDialog(); 1868 window_->ShowAboutChromeDialog();
1855 #endif 1869 #endif
1856 } 1870 }
(...skipping 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after
4262 // The page transition below is only for the purpose of inserting the tab. 4276 // The page transition below is only for the purpose of inserting the tab.
4263 browser->AddTab(view_source_contents, PageTransition::LINK); 4277 browser->AddTab(view_source_contents, PageTransition::LINK);
4264 } 4278 }
4265 4279
4266 if (profile_->HasSessionService()) { 4280 if (profile_->HasSessionService()) {
4267 SessionService* session_service = profile_->GetSessionService(); 4281 SessionService* session_service = profile_->GetSessionService();
4268 if (session_service) 4282 if (session_service)
4269 session_service->TabRestored(&view_source_contents->controller(), false); 4283 session_service->TabRestored(&view_source_contents->controller(), false);
4270 } 4284 }
4271 } 4285 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698