From c8de64a361acfe2be034fdc0d925f07e25889a07 Mon Sep 17 00:00:00 2001 From: "stuartmorgan@chromium.org" Date: Tue, 25 Jan 2011 17:10:23 +0000 Subject: Fix DOMUI pref mode handling of Mac menu items In DOMUI pref mode, Mac menu items should open prefs via a browser window. Also fixes OpenSyncMyBookmarksDialog on all platforms. BUG=67670 TEST=Choosing a pref-opening menu item from the Chrome menu on Mac should open DOMUI prefs. Review URL: http://codereview.chromium.org/6293018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72500 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/browser.cc | 16 +++++++++++++++- chrome/browser/ui/browser.h | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'chrome/browser/ui') diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 1281094..c95aa7d 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -689,6 +689,20 @@ void Browser::OpenOptionsWindow(Profile* profile) { browser->ShowOptionsTab(chrome::kDefaultOptionsSubPage); browser->window()->Show(); } + +// static +void Browser::OpenClearBrowingDataDialogWindow(Profile* profile) { + Browser* browser = Browser::Create(profile); + browser->OpenClearBrowsingDataDialog(); + browser->window()->Show(); +} + +// static +void Browser::OpenImportSettingsDialogWindow(Profile* profile) { + Browser* browser = Browser::Create(profile); + browser->OpenImportSettingsDialog(); + browser->window()->Show(); +} #endif // static @@ -1847,7 +1861,7 @@ void Browser::OpenImportSettingsDialog() { void Browser::OpenSyncMyBookmarksDialog() { sync_ui_util::OpenSyncMyBookmarksDialog( - profile_, ProfileSyncService::START_FROM_WRENCH); + profile_, this, ProfileSyncService::START_FROM_WRENCH); } void Browser::OpenAboutChromeDialog() { diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index a72e7e9..d59030e 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -277,6 +277,8 @@ class Browser : public TabHandlerDelegate, static void OpenDownloadsWindow(Profile* profile); static void OpenHelpWindow(Profile* profile); static void OpenOptionsWindow(Profile* profile); + static void OpenClearBrowingDataDialogWindow(Profile* profile); + static void OpenImportSettingsDialogWindow(Profile* profile); #endif // Opens a window with the extensions tab in it - needed by long-lived -- cgit v1.1