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 <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 2428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2439 PrefService::UNSYNCABLE_PREF); | 2439 PrefService::UNSYNCABLE_PREF); |
2440 prefs->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, | 2440 prefs->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, |
2441 true, | 2441 true, |
2442 PrefService::UNSYNCABLE_PREF); | 2442 PrefService::UNSYNCABLE_PREF); |
2443 prefs->RegisterBooleanPref(prefs::kEnableReferrers, | 2443 prefs->RegisterBooleanPref(prefs::kEnableReferrers, |
2444 true, | 2444 true, |
2445 PrefService::UNSYNCABLE_PREF); | 2445 PrefService::UNSYNCABLE_PREF); |
2446 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, | 2446 prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, |
2447 true, | 2447 true, |
2448 PrefService::UNSYNCABLE_PREF); | 2448 PrefService::UNSYNCABLE_PREF); |
| 2449 |
| 2450 // Initialize the disk cache prefs. |
| 2451 prefs->RegisterFilePathPref(prefs::kDiskCacheDir, |
| 2452 FilePath(), |
| 2453 PrefService::UNSYNCABLE_PREF); |
| 2454 prefs->RegisterIntegerPref(prefs::kDiskCacheSize, |
| 2455 0, |
| 2456 PrefService::UNSYNCABLE_PREF); |
| 2457 prefs->RegisterIntegerPref(prefs::kMediaCacheSize, |
| 2458 0, |
| 2459 PrefService::UNSYNCABLE_PREF); |
2449 } | 2460 } |
2450 | 2461 |
2451 // static | 2462 // static |
2452 bool Browser::RunUnloadEventsHelper(TabContents* contents) { | 2463 bool Browser::RunUnloadEventsHelper(TabContents* contents) { |
2453 // If the TabContents is not connected yet, then there's no unload | 2464 // If the TabContents is not connected yet, then there's no unload |
2454 // handler we can fire even if the TabContents has an unload listener. | 2465 // handler we can fire even if the TabContents has an unload listener. |
2455 // One case where we hit this is in a tab that has an infinite loop | 2466 // One case where we hit this is in a tab that has an infinite loop |
2456 // before load. | 2467 // before load. |
2457 if (contents->NeedToFireBeforeUnload()) { | 2468 if (contents->NeedToFireBeforeUnload()) { |
2458 // If the page has unload listeners, then we tell the renderer to fire | 2469 // If the page has unload listeners, then we tell the renderer to fire |
(...skipping 3050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5509 } | 5520 } |
5510 | 5521 |
5511 void Browser::UpdateFullscreenExitBubbleContent() { | 5522 void Browser::UpdateFullscreenExitBubbleContent() { |
5512 GURL url; | 5523 GURL url; |
5513 if (fullscreened_tab_) | 5524 if (fullscreened_tab_) |
5514 url = fullscreened_tab_->tab_contents()->GetURL(); | 5525 url = fullscreened_tab_->tab_contents()->GetURL(); |
5515 | 5526 |
5516 window_->UpdateFullscreenExitBubbleContent( | 5527 window_->UpdateFullscreenExitBubbleContent( |
5517 url, GetFullscreenExitBubbleType()); | 5528 url, GetFullscreenExitBubbleType()); |
5518 } | 5529 } |
OLD | NEW |