OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/browser_mac.h" | 5 #include "chrome/browser/ui/browser_mac.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 | 10 |
11 namespace chrome { | 11 namespace chrome { |
12 | 12 |
13 void OpenAboutWindow(Profile* profile) { | 13 void OpenAboutWindow(Profile* profile) { |
14 Browser* browser = new Browser(Browser::CreateParams(profile)); | 14 Browser* browser = new Browser(Browser::CreateParams(profile, true)); |
15 ShowAboutChrome(browser); | 15 ShowAboutChrome(browser); |
16 browser->window()->Show(); | 16 browser->window()->Show(); |
17 } | 17 } |
18 | 18 |
19 void OpenHistoryWindow(Profile* profile) { | 19 void OpenHistoryWindow(Profile* profile) { |
20 Browser* browser = | 20 Browser* browser = new Browser(Browser::CreateParams(profile, true)); |
21 new Browser(Browser::CreateParams(profile)); | |
22 ShowHistory(browser); | 21 ShowHistory(browser); |
23 browser->window()->Show(); | 22 browser->window()->Show(); |
24 } | 23 } |
25 | 24 |
26 void OpenDownloadsWindow(Profile* profile) { | 25 void OpenDownloadsWindow(Profile* profile) { |
27 Browser* browser = new Browser(Browser::CreateParams(profile)); | 26 Browser* browser = new Browser(Browser::CreateParams(profile, true)); |
28 ShowDownloads(browser); | 27 ShowDownloads(browser); |
29 browser->window()->Show(); | 28 browser->window()->Show(); |
30 } | 29 } |
31 | 30 |
32 void OpenHelpWindow(Profile* profile, HelpSource source) { | 31 void OpenHelpWindow(Profile* profile, HelpSource source) { |
33 Browser* browser = new Browser(Browser::CreateParams(profile)); | 32 Browser* browser = new Browser(Browser::CreateParams(profile, true)); |
34 ShowHelp(browser, source); | 33 ShowHelp(browser, source); |
35 browser->window()->Show(); | 34 browser->window()->Show(); |
36 } | 35 } |
37 | 36 |
38 void OpenOptionsWindow(Profile* profile) { | 37 void OpenOptionsWindow(Profile* profile) { |
39 Browser* browser = new Browser(Browser::CreateParams(profile)); | 38 Browser* browser = new Browser(Browser::CreateParams(profile, true)); |
40 ShowSettings(browser); | 39 ShowSettings(browser); |
41 browser->window()->Show(); | 40 browser->window()->Show(); |
42 } | 41 } |
43 | 42 |
44 void OpenClearBrowsingDataDialogWindow(Profile* profile) { | 43 void OpenClearBrowsingDataDialogWindow(Profile* profile) { |
45 Browser* browser = new Browser(Browser::CreateParams(profile)); | 44 Browser* browser = new Browser(Browser::CreateParams(profile, true)); |
46 ShowClearBrowsingDataDialog(browser); | 45 ShowClearBrowsingDataDialog(browser); |
47 browser->window()->Show(); | 46 browser->window()->Show(); |
48 } | 47 } |
49 | 48 |
50 void OpenImportSettingsDialogWindow(Profile* profile) { | 49 void OpenImportSettingsDialogWindow(Profile* profile) { |
51 Browser* browser = new Browser(Browser::CreateParams(profile)); | 50 Browser* browser = new Browser(Browser::CreateParams(profile, true)); |
52 ShowImportDialog(browser); | 51 ShowImportDialog(browser); |
53 browser->window()->Show(); | 52 browser->window()->Show(); |
54 } | 53 } |
55 | 54 |
56 void OpenBookmarkManagerWindow(Profile* profile) { | 55 void OpenBookmarkManagerWindow(Profile* profile) { |
57 Browser* browser = new Browser(Browser::CreateParams(profile)); | 56 Browser* browser = new Browser(Browser::CreateParams(profile, true)); |
58 ShowBookmarkManager(browser); | 57 ShowBookmarkManager(browser); |
59 browser->window()->Show(); | 58 browser->window()->Show(); |
60 } | 59 } |
61 | 60 |
62 void OpenExtensionsWindow(Profile* profile) { | 61 void OpenExtensionsWindow(Profile* profile) { |
63 Browser* browser = new Browser(Browser::CreateParams(profile)); | 62 Browser* browser = new Browser(Browser::CreateParams(profile, true)); |
64 ShowExtensions(browser, std::string()); | 63 ShowExtensions(browser, std::string()); |
65 browser->window()->Show(); | 64 browser->window()->Show(); |
66 } | 65 } |
67 | 66 |
68 } // namespace chrome | 67 } // namespace chrome |
OLD | NEW |