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 3// found in the LICENSE file. 4 5#include "chrome/browser/ui/browser_mac.h" 6 7#include "chrome/browser/profiles/profile.h" 8#include "chrome/browser/ui/browser.h" 9#include "chrome/browser/ui/browser_window.h" 10#include "chrome/browser/ui/host_desktop.h" 11 12namespace chrome { 13 14void OpenAboutWindow(Profile* profile) { 15 Browser* browser = 16 new Browser(Browser::CreateParams(profile, 17 chrome::HOST_DESKTOP_TYPE_NATIVE)); 18 ShowAboutChrome(browser); 19 browser->window()->Show(); 20} 21 22void OpenHistoryWindow(Profile* profile) { 23 Browser* browser = 24 new Browser(Browser::CreateParams(profile, 25 chrome::HOST_DESKTOP_TYPE_NATIVE)); 26 ShowHistory(browser); 27 browser->window()->Show(); 28} 29 30void OpenDownloadsWindow(Profile* profile) { 31 Browser* browser = 32 new Browser(Browser::CreateParams(profile, 33 chrome::HOST_DESKTOP_TYPE_NATIVE)); 34 ShowDownloads(browser); 35 browser->window()->Show(); 36} 37 38void OpenHelpWindow(Profile* profile, HelpSource source) { 39 Browser* browser = 40 new Browser(Browser::CreateParams(profile, 41 chrome::HOST_DESKTOP_TYPE_NATIVE)); 42 ShowHelp(browser, source); 43 browser->window()->Show(); 44} 45 46void OpenOptionsWindow(Profile* profile) { 47 Browser* browser = 48 new Browser(Browser::CreateParams(profile, 49 chrome::HOST_DESKTOP_TYPE_NATIVE)); 50 ShowSettings(browser); 51 browser->window()->Show(); 52} 53 54void OpenSyncSetupWindow(Profile* profile, signin::Source source) { 55 Browser* browser = 56 new Browser(Browser::CreateParams(profile, 57 chrome::HOST_DESKTOP_TYPE_NATIVE)); 58 ShowBrowserSignin(browser, source); 59 browser->window()->Show(); 60} 61 62void OpenClearBrowsingDataDialogWindow(Profile* profile) { 63 Browser* browser = 64 new Browser(Browser::CreateParams(profile, 65 chrome::HOST_DESKTOP_TYPE_NATIVE)); 66 ShowClearBrowsingDataDialog(browser); 67 browser->window()->Show(); 68} 69 70void OpenImportSettingsDialogWindow(Profile* profile) { 71 Browser* browser = 72 new Browser(Browser::CreateParams(profile, 73 chrome::HOST_DESKTOP_TYPE_NATIVE)); 74 ShowImportDialog(browser); 75 browser->window()->Show(); 76} 77 78void OpenBookmarkManagerWindow(Profile* profile) { 79 Browser* browser = 80 new Browser(Browser::CreateParams(profile, 81 chrome::HOST_DESKTOP_TYPE_NATIVE)); 82 ShowBookmarkManager(browser); 83 browser->window()->Show(); 84} 85 86void OpenExtensionsWindow(Profile* profile) { 87 Browser* browser = 88 new Browser(Browser::CreateParams(profile, 89 chrome::HOST_DESKTOP_TYPE_NATIVE)); 90 ShowExtensions(browser, std::string()); 91 browser->window()->Show(); 92} 93 94} // namespace chrome 95