| 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 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1913 prefs->RegisterBooleanPref(prefs::kDeleteFormData, true); | 1913 prefs->RegisterBooleanPref(prefs::kDeleteFormData, true); |
| 1914 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0); | 1914 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0); |
| 1915 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true); | 1915 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true); |
| 1916 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true); | 1916 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true); |
| 1917 prefs->RegisterBooleanPref(prefs::kShowExtensionShelf, true); | 1917 prefs->RegisterBooleanPref(prefs::kShowExtensionShelf, true); |
| 1918 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); | 1918 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); |
| 1919 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); | 1919 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); |
| 1920 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); | 1920 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); |
| 1921 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false); | 1921 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false); |
| 1922 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true); | 1922 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true); |
| 1923 prefs->RegisterIntegerPref(prefs::kNTPPromoViewsRemaining, 5); | |
| 1924 } | 1923 } |
| 1925 | 1924 |
| 1926 // static | 1925 // static |
| 1927 Browser* Browser::GetBrowserForController( | 1926 Browser* Browser::GetBrowserForController( |
| 1928 const NavigationController* controller, int* index_result) { | 1927 const NavigationController* controller, int* index_result) { |
| 1929 BrowserList::const_iterator it; | 1928 BrowserList::const_iterator it; |
| 1930 for (it = BrowserList::begin(); it != BrowserList::end(); ++it) { | 1929 for (it = BrowserList::begin(); it != BrowserList::end(); ++it) { |
| 1931 int index = (*it)->tabstrip_model_.GetIndexOfController(controller); | 1930 int index = (*it)->tabstrip_model_.GetIndexOfController(controller); |
| 1932 if (index != TabStripModel::kNoTab) { | 1931 if (index != TabStripModel::kNoTab) { |
| 1933 if (index_result) | 1932 if (index_result) |
| (...skipping 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4061 } | 4060 } |
| 4062 | 4061 |
| 4063 bool Browser::IsPinned(TabContents* source) { | 4062 bool Browser::IsPinned(TabContents* source) { |
| 4064 int index = tabstrip_model_.GetIndexOfTabContents(source); | 4063 int index = tabstrip_model_.GetIndexOfTabContents(source); |
| 4065 if (index == TabStripModel::kNoTab) { | 4064 if (index == TabStripModel::kNoTab) { |
| 4066 NOTREACHED() << "IsPinned called for tab not in our strip"; | 4065 NOTREACHED() << "IsPinned called for tab not in our strip"; |
| 4067 return false; | 4066 return false; |
| 4068 } | 4067 } |
| 4069 return tabstrip_model_.IsTabPinned(index); | 4068 return tabstrip_model_.IsTabPinned(index); |
| 4070 } | 4069 } |
| OLD | NEW |