| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser.h" | 5 #include "chrome/browser/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1822 !home_page_is_new_tab_page_pref->IsManaged() && | 1822 !home_page_is_new_tab_page_pref->IsManaged() && |
| 1823 !prefs->HasPrefPath(prefs::kHomePageIsNewTabPage)) | 1823 !prefs->HasPrefPath(prefs::kHomePageIsNewTabPage)) |
| 1824 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false); | 1824 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false); |
| 1825 } | 1825 } |
| 1826 | 1826 |
| 1827 // static | 1827 // static |
| 1828 void Browser::RegisterPrefs(PrefService* prefs) { | 1828 void Browser::RegisterPrefs(PrefService* prefs) { |
| 1829 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); | 1829 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); |
| 1830 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); | 1830 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); |
| 1831 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1); | 1831 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1); |
| 1832 prefs->RegisterDictionaryPref(prefs::kPreferencesWindowPlacement); |
| 1832 } | 1833 } |
| 1833 | 1834 |
| 1834 // static | 1835 // static |
| 1835 void Browser::RegisterUserPrefs(PrefService* prefs) { | 1836 void Browser::RegisterUserPrefs(PrefService* prefs) { |
| 1836 prefs->RegisterStringPref(prefs::kHomePage, | 1837 prefs->RegisterStringPref(prefs::kHomePage, |
| 1837 ASCIIToWide(chrome::kChromeUINewTabURL)); | 1838 ASCIIToWide(chrome::kChromeUINewTabURL)); |
| 1838 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); | 1839 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); |
| 1839 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false); | 1840 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false); |
| 1840 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); | 1841 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); |
| 1841 #if defined(OS_MACOSX) | 1842 #if defined(OS_MACOSX) |
| (...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3917 } | 3918 } |
| 3918 | 3919 |
| 3919 bool Browser::IsPinned(TabContents* source) { | 3920 bool Browser::IsPinned(TabContents* source) { |
| 3920 int index = tabstrip_model_.GetIndexOfTabContents(source); | 3921 int index = tabstrip_model_.GetIndexOfTabContents(source); |
| 3921 if (index == TabStripModel::kNoTab) { | 3922 if (index == TabStripModel::kNoTab) { |
| 3922 NOTREACHED() << "IsPinned called for tab not in our strip"; | 3923 NOTREACHED() << "IsPinned called for tab not in our strip"; |
| 3923 return false; | 3924 return false; |
| 3924 } | 3925 } |
| 3925 return tabstrip_model_.IsTabPinned(index); | 3926 return tabstrip_model_.IsTabPinned(index); |
| 3926 } | 3927 } |
| OLD | NEW |