| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 prefs->RegisterBooleanPref(prefs::kEnableBookmarkBar, true); | 2119 prefs->RegisterBooleanPref(prefs::kEnableBookmarkBar, true); |
| 2120 prefs->RegisterBooleanPref(prefs::kRemotingHasSetupCompleted, false); | 2120 prefs->RegisterBooleanPref(prefs::kRemotingHasSetupCompleted, false); |
| 2121 prefs->RegisterStringPref(prefs::kCloudPrintEmail, std::string()); | 2121 prefs->RegisterStringPref(prefs::kCloudPrintEmail, std::string()); |
| 2122 prefs->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true); | 2122 prefs->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true); |
| 2123 prefs->RegisterBooleanPref(prefs::kDevToolsDisabled, false); | 2123 prefs->RegisterBooleanPref(prefs::kDevToolsDisabled, false); |
| 2124 prefs->RegisterBooleanPref(prefs::kIncognitoEnabled, true); | 2124 prefs->RegisterBooleanPref(prefs::kIncognitoEnabled, true); |
| 2125 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1); | 2125 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1); |
| 2126 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); | 2126 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); |
| 2127 prefs->RegisterDictionaryPref(prefs::kPreferencesWindowPlacement); | 2127 prefs->RegisterDictionaryPref(prefs::kPreferencesWindowPlacement); |
| 2128 // We need to register the type of these preferences in order to query | 2128 // We need to register the type of these preferences in order to query |
| 2129 // them even though they're only typically controlled via policy. | 2129 // them even though they're typically only controlled via policy or command |
| 2130 // line switches. |
| 2130 prefs->RegisterBooleanPref(prefs::kDisable3DAPIs, false); | 2131 prefs->RegisterBooleanPref(prefs::kDisable3DAPIs, false); |
| 2131 prefs->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false); | 2132 prefs->RegisterBooleanPref(prefs::kPluginsAllowOutdated, false); |
| 2133 prefs->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, true); |
| 2134 prefs->RegisterBooleanPref(prefs::kEnableReferrers, true); |
| 2132 } | 2135 } |
| 2133 | 2136 |
| 2134 // static | 2137 // static |
| 2135 bool Browser::RunUnloadEventsHelper(TabContents* contents) { | 2138 bool Browser::RunUnloadEventsHelper(TabContents* contents) { |
| 2136 // If the TabContents is not connected yet, then there's no unload | 2139 // If the TabContents is not connected yet, then there's no unload |
| 2137 // handler we can fire even if the TabContents has an unload listener. | 2140 // handler we can fire even if the TabContents has an unload listener. |
| 2138 // One case where we hit this is in a tab that has an infinite loop | 2141 // One case where we hit this is in a tab that has an infinite loop |
| 2139 // before load. | 2142 // before load. |
| 2140 if (contents->NeedToFireBeforeUnload()) { | 2143 if (contents->NeedToFireBeforeUnload()) { |
| 2141 // If the page has unload listeners, then we tell the renderer to fire | 2144 // If the page has unload listeners, then we tell the renderer to fire |
| (...skipping 2305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4447 // The page transition below is only for the purpose of inserting the tab. | 4450 // The page transition below is only for the purpose of inserting the tab. |
| 4448 browser->AddTab(view_source_contents, PageTransition::LINK); | 4451 browser->AddTab(view_source_contents, PageTransition::LINK); |
| 4449 } | 4452 } |
| 4450 | 4453 |
| 4451 if (profile_->HasSessionService()) { | 4454 if (profile_->HasSessionService()) { |
| 4452 SessionService* session_service = profile_->GetSessionService(); | 4455 SessionService* session_service = profile_->GetSessionService(); |
| 4453 if (session_service) | 4456 if (session_service) |
| 4454 session_service->TabRestored(&view_source_contents->controller(), false); | 4457 session_service->TabRestored(&view_source_contents->controller(), false); |
| 4455 } | 4458 } |
| 4456 } | 4459 } |
| OLD | NEW |