| 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/ui/browser.h" | 5 #include "chrome/browser/ui/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 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true); | 2038 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true); |
| 2039 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); | 2039 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); |
| 2040 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); | 2040 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); |
| 2041 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); | 2041 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); |
| 2042 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false); | 2042 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false); |
| 2043 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true); | 2043 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true); |
| 2044 prefs->RegisterBooleanPref(prefs::kRemotingHasSetupCompleted, false); | 2044 prefs->RegisterBooleanPref(prefs::kRemotingHasSetupCompleted, false); |
| 2045 prefs->RegisterStringPref(prefs::kCloudPrintEmail, std::string()); | 2045 prefs->RegisterStringPref(prefs::kCloudPrintEmail, std::string()); |
| 2046 prefs->RegisterBooleanPref(prefs::kDevToolsDisabled, false); | 2046 prefs->RegisterBooleanPref(prefs::kDevToolsDisabled, false); |
| 2047 prefs->RegisterRealPref(prefs::kDefaultZoomLevel, 0.0); | 2047 prefs->RegisterRealPref(prefs::kDefaultZoomLevel, 0.0); |
| 2048 prefs->RegisterIntegerPref(prefs::kMultipleProfilePrefMigration, 0); |
| 2048 } | 2049 } |
| 2049 | 2050 |
| 2050 // static | 2051 // static |
| 2051 bool Browser::RunUnloadEventsHelper(TabContents* contents) { | 2052 bool Browser::RunUnloadEventsHelper(TabContents* contents) { |
| 2052 // If the TabContents is not connected yet, then there's no unload | 2053 // If the TabContents is not connected yet, then there's no unload |
| 2053 // handler we can fire even if the TabContents has an unload listener. | 2054 // handler we can fire even if the TabContents has an unload listener. |
| 2054 // One case where we hit this is in a tab that has an infinite loop | 2055 // One case where we hit this is in a tab that has an infinite loop |
| 2055 // before load. | 2056 // before load. |
| 2056 if (contents->NeedToFireBeforeUnload()) { | 2057 if (contents->NeedToFireBeforeUnload()) { |
| 2057 // If the page has unload listeners, then we tell the renderer to fire | 2058 // If the page has unload listeners, then we tell the renderer to fire |
| (...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4209 // The page transition below is only for the purpose of inserting the tab. | 4210 // The page transition below is only for the purpose of inserting the tab. |
| 4210 browser->AddTab(contents_dupe, PageTransition::LINK); | 4211 browser->AddTab(contents_dupe, PageTransition::LINK); |
| 4211 } | 4212 } |
| 4212 | 4213 |
| 4213 if (profile_->HasSessionService()) { | 4214 if (profile_->HasSessionService()) { |
| 4214 SessionService* session_service = profile_->GetSessionService(); | 4215 SessionService* session_service = profile_->GetSessionService(); |
| 4215 if (session_service) | 4216 if (session_service) |
| 4216 session_service->TabRestored(&new_contents->controller(), pinned); | 4217 session_service->TabRestored(&new_contents->controller(), pinned); |
| 4217 } | 4218 } |
| 4218 } | 4219 } |
| OLD | NEW |