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
12 namespace chrome {
13
OpenAboutWindow(Profile * profile)14 void 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
OpenHistoryWindow(Profile * profile)22 void 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
OpenDownloadsWindow(Profile * profile)30 void 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
OpenHelpWindow(Profile * profile,HelpSource source)38 void 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
OpenOptionsWindow(Profile * profile)46 void 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
OpenSyncSetupWindow(Profile * profile,signin::Source source)54 void 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
OpenClearBrowsingDataDialogWindow(Profile * profile)62 void 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
OpenImportSettingsDialogWindow(Profile * profile)70 void 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
OpenBookmarkManagerWindow(Profile * profile)78 void 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
OpenExtensionsWindow(Profile * profile)86 void 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