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 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ | 5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ |
6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ | 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 Profile* profile); | 84 Profile* profile); |
85 | 85 |
86 void set_is_default_browser_dialog_suppressed(bool new_value) { | 86 void set_is_default_browser_dialog_suppressed(bool new_value) { |
87 is_default_browser_dialog_suppressed_ = new_value; | 87 is_default_browser_dialog_suppressed_ = new_value; |
88 } | 88 } |
89 | 89 |
90 bool is_default_browser_dialog_suppressed() const { | 90 bool is_default_browser_dialog_suppressed() const { |
91 return is_default_browser_dialog_suppressed_; | 91 return is_default_browser_dialog_suppressed_; |
92 } | 92 } |
93 | 93 |
| 94 void set_show_main_browser_window(bool show_main_browser_window) { |
| 95 show_main_browser_window_ = show_main_browser_window; |
| 96 } |
| 97 |
| 98 bool show_main_browser_window() const { |
| 99 return show_main_browser_window_; |
| 100 } |
| 101 |
94 private: | 102 private: |
95 friend class CloudPrintProxyPolicyTest; | 103 friend class CloudPrintProxyPolicyTest; |
96 friend class CloudPrintProxyPolicyStartupTest; | 104 friend class CloudPrintProxyPolicyStartupTest; |
97 friend class StartupBrowserCreatorImpl; | 105 friend class StartupBrowserCreatorImpl; |
98 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, | 106 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, |
99 ReadingWasRestartedAfterNormalStart); | 107 ReadingWasRestartedAfterNormalStart); |
100 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, | 108 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, |
101 ReadingWasRestartedAfterRestart); | 109 ReadingWasRestartedAfterRestart); |
102 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, UpdateWithTwoProfiles); | 110 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorTest, UpdateWithTwoProfiles); |
103 | 111 |
(...skipping 20 matching lines...) Expand all Loading... |
124 Profile::CreateStatus status); | 132 Profile::CreateStatus status); |
125 | 133 |
126 // Additional tabs to open during first run. | 134 // Additional tabs to open during first run. |
127 std::vector<GURL> first_run_tabs_; | 135 std::vector<GURL> first_run_tabs_; |
128 | 136 |
129 // True if the set-as-default dialog has been explicitly supressed. | 137 // True if the set-as-default dialog has been explicitly supressed. |
130 // This information is used to allow the default browser prompt to show on | 138 // This information is used to allow the default browser prompt to show on |
131 // first-run when the dialog has been suppressed. | 139 // first-run when the dialog has been suppressed. |
132 bool is_default_browser_dialog_suppressed_; | 140 bool is_default_browser_dialog_suppressed_; |
133 | 141 |
| 142 // Whether the browser window should be shown immediately after it has been |
| 143 // created. Default is true. |
| 144 bool show_main_browser_window_; |
| 145 |
134 // True if we have already read and reset the preference kWasRestarted. (A | 146 // True if we have already read and reset the preference kWasRestarted. (A |
135 // member variable instead of a static variable inside WasRestarted because | 147 // member variable instead of a static variable inside WasRestarted because |
136 // of testing.) | 148 // of testing.) |
137 static bool was_restarted_read_; | 149 static bool was_restarted_read_; |
138 | 150 |
139 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreator); | 151 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreator); |
140 }; | 152 }; |
141 | 153 |
142 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ | 154 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_H_ |
OLD | NEW |