Chromium Code Reviews| 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 if (key_exists && !value) |
| 770 key, kCFPreferencesCurrentApplication, &key_exists); | 770 is_elastic_overscroll_enabled_ = false; |
| 771 if (key_exists && !value) | 771 else |
| 772 is_elastic_overscroll_enabled_ = false; | 772 is_elastic_overscroll_enabled_ = true; |
|
tapted
2016/04/25 21:25:46
nit: maybe
is_elastic_oberscroll_enabled_ = !key
Nico
2016/04/26 14:30:44
Done.
| |
| 773 } | |
| 774 #else | 773 #else |
| 775 is_elastic_overscroll_enabled_ = false; | 774 is_elastic_overscroll_enabled_ = false; |
| 776 #endif | 775 #endif |
| 777 | 776 |
| 778 std::string image_texture_target_string = | 777 std::string image_texture_target_string = |
| 779 command_line.GetSwitchValueASCII(switches::kContentImageTextureTarget); | 778 command_line.GetSwitchValueASCII(switches::kContentImageTextureTarget); |
| 780 StringToUintVector(image_texture_target_string, &use_image_texture_targets_); | 779 StringToUintVector(image_texture_target_string, &use_image_texture_targets_); |
| 781 | 780 |
| 782 if (command_line.HasSwitch(switches::kDisableLCDText)) { | 781 if (command_line.HasSwitch(switches::kDisableLCDText)) { |
| 783 is_lcd_text_enabled_ = false; | 782 is_lcd_text_enabled_ = false; |
| (...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2113 } | 2112 } |
| 2114 | 2113 |
| 2115 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 2114 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 2116 size_t erased = | 2115 size_t erased = |
| 2117 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 2116 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 2118 routing_id_); | 2117 routing_id_); |
| 2119 DCHECK_EQ(1u, erased); | 2118 DCHECK_EQ(1u, erased); |
| 2120 } | 2119 } |
| 2121 | 2120 |
| 2122 } // namespace content | 2121 } // namespace content |
| OLD | NEW |