| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/tab_contents/web_contents.h" | 5 #include "chrome/browser/tab_contents/web_contents.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 !command_line.HasSwitch(switches::kDisablePlugins) && | 1395 !command_line.HasSwitch(switches::kDisablePlugins) && |
| 1396 prefs->GetBoolean(prefs::kWebKitPluginsEnabled); | 1396 prefs->GetBoolean(prefs::kWebKitPluginsEnabled); |
| 1397 web_prefs.java_enabled = | 1397 web_prefs.java_enabled = |
| 1398 !command_line.HasSwitch(switches::kDisableJava) && | 1398 !command_line.HasSwitch(switches::kDisableJava) && |
| 1399 prefs->GetBoolean(prefs::kWebKitJavaEnabled); | 1399 prefs->GetBoolean(prefs::kWebKitJavaEnabled); |
| 1400 web_prefs.loads_images_automatically = | 1400 web_prefs.loads_images_automatically = |
| 1401 !command_line.HasSwitch(switches::kDisableImages) && | 1401 !command_line.HasSwitch(switches::kDisableImages) && |
| 1402 prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically); | 1402 prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically); |
| 1403 web_prefs.uses_page_cache = | 1403 web_prefs.uses_page_cache = |
| 1404 command_line.HasSwitch(switches::kEnableFastback); | 1404 command_line.HasSwitch(switches::kEnableFastback); |
| 1405 web_prefs.remote_font_enabled = |
| 1406 command_line.HasSwitch(switches::kEnableRemoteFont); |
| 1405 } | 1407 } |
| 1406 | 1408 |
| 1407 web_prefs.uses_universal_detector = | 1409 web_prefs.uses_universal_detector = |
| 1408 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); | 1410 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); |
| 1409 web_prefs.text_areas_are_resizable = | 1411 web_prefs.text_areas_are_resizable = |
| 1410 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); | 1412 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); |
| 1411 | 1413 |
| 1412 // User CSS is currently disabled because it crashes chrome. See | 1414 // User CSS is currently disabled because it crashes chrome. See |
| 1413 // webkit/glue/webpreferences.h for more details. | 1415 // webkit/glue/webpreferences.h for more details. |
| 1414 | 1416 |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 // -> Use pending DOM UI if any. | 2041 // -> Use pending DOM UI if any. |
| 2040 // | 2042 // |
| 2041 // - Normal state with no load: committed nav entry + no pending nav entry: | 2043 // - Normal state with no load: committed nav entry + no pending nav entry: |
| 2042 // -> Use committed DOM UI. | 2044 // -> Use committed DOM UI. |
| 2043 if (controller()->GetPendingEntry() && | 2045 if (controller()->GetPendingEntry() && |
| 2044 (controller()->GetLastCommittedEntry() || | 2046 (controller()->GetLastCommittedEntry() || |
| 2045 render_manager_.pending_dom_ui())) | 2047 render_manager_.pending_dom_ui())) |
| 2046 return render_manager_.pending_dom_ui(); | 2048 return render_manager_.pending_dom_ui(); |
| 2047 return render_manager_.dom_ui(); | 2049 return render_manager_.dom_ui(); |
| 2048 } | 2050 } |
| OLD | NEW |