Add ability to gather metrics to BubbleManager.
[chromium-blink-merge.git] / chrome / browser / ui / browser_mac.cc
blob96068352ae5952846d144e8dc27f96b578f27b35
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"
12 namespace chrome {
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();
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();
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();
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();
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();
54 void OpenSyncSetupWindow(Profile* profile, signin_metrics::Source source) {
55 Browser* browser =
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) {
63 Browser* browser =
64 new Browser(Browser::CreateParams(profile,
65 chrome::HOST_DESKTOP_TYPE_NATIVE));
66 ShowClearBrowsingDataDialog(browser);
67 browser->window()->Show();
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();
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();
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();
94 } // namespace chrome