OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 is_threaded_animation_enabled_ = | 754 is_threaded_animation_enabled_ = |
755 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); | 755 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); |
756 | 756 |
757 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 757 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
758 is_partial_raster_enabled_ = | 758 is_partial_raster_enabled_ = |
759 !command_line.HasSwitch(switches::kDisablePartialRaster); | 759 !command_line.HasSwitch(switches::kDisablePartialRaster); |
760 is_gpu_memory_buffer_compositor_resources_enabled_ = command_line.HasSwitch( | 760 is_gpu_memory_buffer_compositor_resources_enabled_ = command_line.HasSwitch( |
761 switches::kEnableGpuMemoryBufferCompositorResources); | 761 switches::kEnableGpuMemoryBufferCompositorResources); |
762 | 762 |
763 #if defined(OS_MACOSX) | 763 #if defined(OS_MACOSX) |
764 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); | 764 base::ScopedCFTypeRef<CFStringRef> key( |
765 if (is_elastic_overscroll_enabled_) { | 765 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); |
766 base::ScopedCFTypeRef<CFStringRef> key( | 766 Boolean key_exists = false; |
767 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); | 767 Boolean value = CFPreferencesGetAppBooleanValue( |
768 Boolean key_exists = false; | 768 key, kCFPreferencesCurrentApplication, &key_exists); |
769 Boolean value = CFPreferencesGetAppBooleanValue( | 769 is_elastic_overscroll_enabled_ = !key_exists || value; |
770 key, kCFPreferencesCurrentApplication, &key_exists); | |
771 if (key_exists && !value) | |
772 is_elastic_overscroll_enabled_ = false; | |
773 } | |
774 #else | 770 #else |
775 is_elastic_overscroll_enabled_ = false; | 771 is_elastic_overscroll_enabled_ = false; |
776 #endif | 772 #endif |
777 | 773 |
778 std::string image_texture_target_string = | 774 std::string image_texture_target_string = |
779 command_line.GetSwitchValueASCII(switches::kContentImageTextureTarget); | 775 command_line.GetSwitchValueASCII(switches::kContentImageTextureTarget); |
780 StringToUintVector(image_texture_target_string, &use_image_texture_targets_); | 776 StringToUintVector(image_texture_target_string, &use_image_texture_targets_); |
781 | 777 |
782 if (command_line.HasSwitch(switches::kDisableLCDText)) { | 778 if (command_line.HasSwitch(switches::kDisableLCDText)) { |
783 is_lcd_text_enabled_ = false; | 779 is_lcd_text_enabled_ = false; |
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 } | 2109 } |
2114 | 2110 |
2115 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 2111 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
2116 size_t erased = | 2112 size_t erased = |
2117 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 2113 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
2118 routing_id_); | 2114 routing_id_); |
2119 DCHECK_EQ(1u, erased); | 2115 DCHECK_EQ(1u, erased); |
2120 } | 2116 } |
2121 | 2117 |
2122 } // namespace content | 2118 } // namespace content |
OLD | NEW |