Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: chrome/browser/ui/startup/startup_tab_provider.h

Issue 2719383002: Do not show pinned tabs on multiple instances (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_tab_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool is_first_run, 85 bool is_first_run,
86 const std::vector<GURL>& first_run_tabs); 86 const std::vector<GURL>& first_run_tabs);
87 87
88 // Determines which tabs should be shown as a result of the presence/absence 88 // Determines which tabs should be shown as a result of the presence/absence
89 // of a Reset Trigger on this profile. 89 // of a Reset Trigger on this profile.
90 static StartupTabs CheckResetTriggerTabPolicy(bool profile_has_trigger); 90 static StartupTabs CheckResetTriggerTabPolicy(bool profile_has_trigger);
91 91
92 // Determines whether the startup preference requires the contents of 92 // Determines whether the startup preference requires the contents of
93 // |pinned_tabs| to be shown. This is needed to avoid duplicates, as the 93 // |pinned_tabs| to be shown. This is needed to avoid duplicates, as the
94 // session restore logic will also resurface pinned tabs on its own. 94 // session restore logic will also resurface pinned tabs on its own.
95 static StartupTabs CheckPinnedTabPolicy(const SessionStartupPref& pref, 95 static StartupTabs CheckPinnedTabPolicy(
96 const StartupTabs& pinned_tabs); 96 const SessionStartupPref& pref,
97 const StartupTabs& pinned_tabs,
98 bool profile_has_other_tabbed_browser);
97 99
98 // Determines whether preferences and window state indicate that 100 // Determines whether preferences and window state indicate that
99 // user-specified tabs should be shown as the default new window content, and 101 // user-specified tabs should be shown as the default new window content, and
100 // returns the specified tabs if so. 102 // returns the specified tabs if so.
101 static StartupTabs CheckPreferencesTabPolicy( 103 static StartupTabs CheckPreferencesTabPolicy(
102 const SessionStartupPref& pref, 104 const SessionStartupPref& pref,
103 bool profile_has_other_tabbed_browser); 105 bool profile_has_other_tabbed_browser);
104 106
105 // Determines whether startup preferences require the New Tab Page to be 107 // Determines whether startup preferences require the New Tab Page to be
106 // explicitly specified. Session Restore does not expect the NTP to be passed. 108 // explicitly specified. Session Restore does not expect the NTP to be passed.
(...skipping 26 matching lines...) Expand all
133 StartupTabs GetPreferencesTabs(const base::CommandLine& command_line, 135 StartupTabs GetPreferencesTabs(const base::CommandLine& command_line,
134 Profile* profile) const override; 136 Profile* profile) const override;
135 StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line, 137 StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line,
136 Profile* profile) const override; 138 Profile* profile) const override;
137 139
138 private: 140 private:
139 DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl); 141 DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl);
140 }; 142 };
141 143
142 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ 144 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_tab_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698