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.
5 #include "chrome/browser/ui/browser_mac.h"
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"
14 void OpenAboutWindow(Profile
* profile
) {
16 new Browser(Browser::CreateParams(profile
,
17 chrome::HOST_DESKTOP_TYPE_NATIVE
));
18 ShowAboutChrome(browser
);
19 browser
->window()->Show();
22 void OpenHistoryWindow(Profile
* profile
) {
24 new Browser(Browser::CreateParams(profile
,
25 chrome::HOST_DESKTOP_TYPE_NATIVE
));
27 browser
->window()->Show();
30 void OpenDownloadsWindow(Profile
* profile
) {
32 new Browser(Browser::CreateParams(profile
,
33 chrome::HOST_DESKTOP_TYPE_NATIVE
));
34 ShowDownloads(browser
);
35 browser
->window()->Show();
38 void OpenHelpWindow(Profile
* profile
, HelpSource source
) {
40 new Browser(Browser::CreateParams(profile
,
41 chrome::HOST_DESKTOP_TYPE_NATIVE
));
42 ShowHelp(browser
, source
);
43 browser
->window()->Show();
46 void OpenOptionsWindow(Profile
* profile
) {
48 new Browser(Browser::CreateParams(profile
,
49 chrome::HOST_DESKTOP_TYPE_NATIVE
));
50 ShowSettings(browser
);
51 browser
->window()->Show();
54 void OpenSyncSetupWindow(Profile
* profile
, signin_metrics::Source source
) {
56 new Browser(Browser::CreateParams(profile
,
57 chrome::HOST_DESKTOP_TYPE_NATIVE
));
58 ShowBrowserSigninOrSettings(browser
, source
);
59 browser
->window()->Show();
62 void OpenClearBrowsingDataDialogWindow(Profile
* profile
) {
64 new Browser(Browser::CreateParams(profile
,
65 chrome::HOST_DESKTOP_TYPE_NATIVE
));
66 ShowClearBrowsingDataDialog(browser
);
67 browser
->window()->Show();
70 void OpenImportSettingsDialogWindow(Profile
* profile
) {
72 new Browser(Browser::CreateParams(profile
,
73 chrome::HOST_DESKTOP_TYPE_NATIVE
));
74 ShowImportDialog(browser
);
75 browser
->window()->Show();
78 void OpenBookmarkManagerWindow(Profile
* profile
) {
80 new Browser(Browser::CreateParams(profile
,
81 chrome::HOST_DESKTOP_TYPE_NATIVE
));
82 ShowBookmarkManager(browser
);
83 browser
->window()->Show();
86 void OpenExtensionsWindow(Profile
* profile
) {
88 new Browser(Browser::CreateParams(profile
,
89 chrome::HOST_DESKTOP_TYPE_NATIVE
));
90 ShowExtensions(browser
, std::string());
91 browser
->window()->Show();