| 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 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1909 prefs->RegisterBooleanPref(prefs::kDeleteFormData, true); | 1909 prefs->RegisterBooleanPref(prefs::kDeleteFormData, true); |
| 1910 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0); | 1910 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0); |
| 1911 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true); | 1911 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true); |
| 1912 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true); | 1912 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true); |
| 1913 prefs->RegisterBooleanPref(prefs::kShowExtensionShelf, true); | 1913 prefs->RegisterBooleanPref(prefs::kShowExtensionShelf, true); |
| 1914 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); | 1914 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); |
| 1915 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); | 1915 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); |
| 1916 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); | 1916 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); |
| 1917 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false); | 1917 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false); |
| 1918 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true); | 1918 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true); |
| 1919 prefs->RegisterIntegerPref(prefs::kNTPPromoViewsRemaining, 5); | |
| 1920 } | 1919 } |
| 1921 | 1920 |
| 1922 // static | 1921 // static |
| 1923 Browser* Browser::GetBrowserForController( | 1922 Browser* Browser::GetBrowserForController( |
| 1924 const NavigationController* controller, int* index_result) { | 1923 const NavigationController* controller, int* index_result) { |
| 1925 BrowserList::const_iterator it; | 1924 BrowserList::const_iterator it; |
| 1926 for (it = BrowserList::begin(); it != BrowserList::end(); ++it) { | 1925 for (it = BrowserList::begin(); it != BrowserList::end(); ++it) { |
| 1927 int index = (*it)->tabstrip_model_.GetIndexOfController(controller); | 1926 int index = (*it)->tabstrip_model_.GetIndexOfController(controller); |
| 1928 if (index != TabStripModel::kNoTab) { | 1927 if (index != TabStripModel::kNoTab) { |
| 1929 if (index_result) | 1928 if (index_result) |
| (...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4046 } | 4045 } |
| 4047 | 4046 |
| 4048 bool Browser::IsPinned(TabContents* source) { | 4047 bool Browser::IsPinned(TabContents* source) { |
| 4049 int index = tabstrip_model_.GetIndexOfTabContents(source); | 4048 int index = tabstrip_model_.GetIndexOfTabContents(source); |
| 4050 if (index == TabStripModel::kNoTab) { | 4049 if (index == TabStripModel::kNoTab) { |
| 4051 NOTREACHED() << "IsPinned called for tab not in our strip"; | 4050 NOTREACHED() << "IsPinned called for tab not in our strip"; |
| 4052 return false; | 4051 return false; |
| 4053 } | 4052 } |
| 4054 return tabstrip_model_.IsTabPinned(index); | 4053 return tabstrip_model_.IsTabPinned(index); |
| 4055 } | 4054 } |
| OLD | NEW |