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 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 prefs->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, | 2186 prefs->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, |
2187 false, | 2187 false, |
2188 PrefService::UNSYNCABLE_PREF); | 2188 PrefService::UNSYNCABLE_PREF); |
2189 prefs->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, | 2189 prefs->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, |
2190 true, | 2190 true, |
2191 PrefService::UNSYNCABLE_PREF); | 2191 PrefService::UNSYNCABLE_PREF); |
2192 prefs->RegisterBooleanPref(prefs::kEnableReferrers, | 2192 prefs->RegisterBooleanPref(prefs::kEnableReferrers, |
2193 true, | 2193 true, |
2194 PrefService::UNSYNCABLE_PREF); | 2194 PrefService::UNSYNCABLE_PREF); |
2195 prefs->RegisterBooleanPref(prefs::kWebKitAllowRunningInsecureContent, | 2195 prefs->RegisterBooleanPref(prefs::kWebKitAllowRunningInsecureContent, |
2196 false, | 2196 true, |
2197 PrefService::UNSYNCABLE_PREF); | 2197 PrefService::UNSYNCABLE_PREF); |
2198 prefs->RegisterBooleanPref(prefs::kWebKitAllowDisplayingInsecureContent, | 2198 prefs->RegisterBooleanPref(prefs::kWebKitAllowDisplayingInsecureContent, |
2199 true, | 2199 true, |
2200 PrefService::UNSYNCABLE_PREF); | 2200 PrefService::UNSYNCABLE_PREF); |
2201 } | 2201 } |
2202 | 2202 |
2203 // static | 2203 // static |
2204 bool Browser::RunUnloadEventsHelper(TabContents* contents) { | 2204 bool Browser::RunUnloadEventsHelper(TabContents* contents) { |
2205 // If the TabContents is not connected yet, then there's no unload | 2205 // If the TabContents is not connected yet, then there's no unload |
2206 // handler we can fire even if the TabContents has an unload listener. | 2206 // handler we can fire even if the TabContents has an unload listener. |
(...skipping 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4565 TabContents* current_tab = GetSelectedTabContents(); | 4565 TabContents* current_tab = GetSelectedTabContents(); |
4566 if (current_tab) { | 4566 if (current_tab) { |
4567 content_restrictions = current_tab->content_restrictions(); | 4567 content_restrictions = current_tab->content_restrictions(); |
4568 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); | 4568 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); |
4569 // See comment in UpdateCommandsForTabState about why we call url(). | 4569 // See comment in UpdateCommandsForTabState about why we call url(). |
4570 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) | 4570 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) |
4571 content_restrictions |= CONTENT_RESTRICTION_SAVE; | 4571 content_restrictions |= CONTENT_RESTRICTION_SAVE; |
4572 } | 4572 } |
4573 return content_restrictions; | 4573 return content_restrictions; |
4574 } | 4574 } |
OLD | NEW |