OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_TAB_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ |
6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ | 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool is_first_run, | 86 bool is_first_run, |
87 const std::vector<GURL>& first_run_tabs); | 87 const std::vector<GURL>& first_run_tabs); |
88 | 88 |
89 // Determines which tabs should be shown as a result of the presence/absence | 89 // Determines which tabs should be shown as a result of the presence/absence |
90 // of a Reset Trigger on this profile. | 90 // of a Reset Trigger on this profile. |
91 static StartupTabs GetResetTriggerTabsForState(bool profile_has_trigger); | 91 static StartupTabs GetResetTriggerTabsForState(bool profile_has_trigger); |
92 | 92 |
93 // Determines whether the startup preference requires the contents of | 93 // Determines whether the startup preference requires the contents of |
94 // |pinned_tabs| to be shown. This is needed to avoid duplicates, as the | 94 // |pinned_tabs| to be shown. This is needed to avoid duplicates, as the |
95 // session restore logic will also resurface pinned tabs on its own. | 95 // session restore logic will also resurface pinned tabs on its own. |
96 static StartupTabs GetPinnedTabsForState(const SessionStartupPref& pref, | 96 static StartupTabs GetPinnedTabsForState( |
97 const StartupTabs& pinned_tabs); | 97 const SessionStartupPref& pref, |
| 98 const StartupTabs& pinned_tabs, |
| 99 bool profile_has_other_tabbed_browser); |
98 | 100 |
99 // Determines whether preferences and window state indicate that | 101 // Determines whether preferences and window state indicate that |
100 // user-specified tabs should be shown as the default new window content, and | 102 // user-specified tabs should be shown as the default new window content, and |
101 // returns the specified tabs if so. | 103 // returns the specified tabs if so. |
102 static StartupTabs GetPreferencesTabsForState( | 104 static StartupTabs GetPreferencesTabsForState( |
103 const SessionStartupPref& pref, | 105 const SessionStartupPref& pref, |
104 bool profile_has_other_tabbed_browser); | 106 bool profile_has_other_tabbed_browser); |
105 | 107 |
106 // Determines whether startup preferences require the New Tab Page to be | 108 // Determines whether startup preferences require the New Tab Page to be |
107 // explicitly specified. Session Restore does not expect the NTP to be passed. | 109 // explicitly specified. Session Restore does not expect the NTP to be passed. |
(...skipping 26 matching lines...) Expand all Loading... |
134 StartupTabs GetPreferencesTabs(const base::CommandLine& command_line, | 136 StartupTabs GetPreferencesTabs(const base::CommandLine& command_line, |
135 Profile* profile) const override; | 137 Profile* profile) const override; |
136 StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line, | 138 StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line, |
137 Profile* profile) const override; | 139 Profile* profile) const override; |
138 | 140 |
139 private: | 141 private: |
140 DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl); | 142 DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl); |
141 }; | 143 }; |
142 | 144 |
143 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ | 145 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ |
OLD | NEW |