| 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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <cmath> | 8 #include <cmath> | 
| 9 #include <string> | 9 #include <string> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 21 #include "base/metrics/histogram.h" | 21 #include "base/metrics/histogram.h" | 
| 22 #include "base/path_service.h" | 22 #include "base/path_service.h" | 
| 23 #include "base/process_util.h" | 23 #include "base/process_util.h" | 
| 24 #include "base/string_number_conversions.h" | 24 #include "base/string_number_conversions.h" | 
| 25 #include "base/string_piece.h" | 25 #include "base/string_piece.h" | 
| 26 #include "base/string_split.h" | 26 #include "base/string_split.h" | 
| 27 #include "base/string_util.h" | 27 #include "base/string_util.h" | 
| 28 #include "base/sys_string_conversions.h" | 28 #include "base/sys_string_conversions.h" | 
| 29 #include "base/time.h" | 29 #include "base/time.h" | 
| 30 #include "base/utf_string_conversions.h" | 30 #include "base/utf_string_conversions.h" | 
|  | 31 #include "cc/switches.h" | 
| 31 #include "content/common/appcache/appcache_dispatcher.h" | 32 #include "content/common/appcache/appcache_dispatcher.h" | 
| 32 #include "content/common/child_thread.h" | 33 #include "content/common/child_thread.h" | 
| 33 #include "content/common/clipboard_messages.h" | 34 #include "content/common/clipboard_messages.h" | 
| 34 #include "content/common/content_constants_internal.h" | 35 #include "content/common/content_constants_internal.h" | 
| 35 #include "content/common/database_messages.h" | 36 #include "content/common/database_messages.h" | 
| 36 #include "content/common/drag_messages.h" | 37 #include "content/common/drag_messages.h" | 
| 37 #include "content/common/fileapi/file_system_dispatcher.h" | 38 #include "content/common/fileapi/file_system_dispatcher.h" | 
| 38 #include "content/common/fileapi/webfilesystem_callback_dispatcher.h" | 39 #include "content/common/fileapi/webfilesystem_callback_dispatcher.h" | 
| 39 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 40 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 
| 40 #include "content/common/intents_messages.h" | 41 #include "content/common/intents_messages.h" | 
| (...skipping 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3197   ProcessAcceleratedPinchZoomFlags(command_line); | 3198   ProcessAcceleratedPinchZoomFlags(command_line); | 
| 3198 } | 3199 } | 
| 3199 | 3200 | 
| 3200 void RenderViewImpl::ProcessAcceleratedPinchZoomFlags( | 3201 void RenderViewImpl::ProcessAcceleratedPinchZoomFlags( | 
| 3201     const CommandLine& command_line) { | 3202     const CommandLine& command_line) { | 
| 3202   bool enable_viewport = | 3203   bool enable_viewport = | 
| 3203       command_line.HasSwitch(switches::kEnableViewport); | 3204       command_line.HasSwitch(switches::kEnableViewport); | 
| 3204   bool enable_pinch = enable_viewport || | 3205   bool enable_pinch = enable_viewport || | 
| 3205                       command_line.HasSwitch(switches::kEnablePinch); | 3206                       command_line.HasSwitch(switches::kEnablePinch); | 
| 3206   bool enable_pinch_in_compositor = | 3207   bool enable_pinch_in_compositor = | 
| 3207       command_line.HasSwitch(switches::kEnablePinchInCompositor); | 3208       command_line.HasSwitch(cc::switches::kEnablePinchInCompositor); | 
| 3208 | 3209 | 
| 3209   if (!enable_pinch && | 3210   if (!enable_pinch && | 
| 3210       webview()->isAcceleratedCompositingActive() && | 3211       webview()->isAcceleratedCompositingActive() && | 
| 3211       webkit_preferences_.apply_default_device_scale_factor_in_compositor && | 3212       webkit_preferences_.apply_default_device_scale_factor_in_compositor && | 
| 3212       device_scale_factor_ != 1) { | 3213       device_scale_factor_ != 1) { | 
| 3213     // Page scaling is disabled by default when applying a scale factor in the | 3214     // Page scaling is disabled by default when applying a scale factor in the | 
| 3214     // compositor since they are currently incompatible. | 3215     // compositor since they are currently incompatible. | 
| 3215     webview()->setPageScaleFactorLimits(1, 1); | 3216     webview()->setPageScaleFactorLimits(1, 1); | 
| 3216   } | 3217   } | 
| 3217 | 3218 | 
| (...skipping 3226 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6444                                                transport_dib->id())); | 6445                                                transport_dib->id())); | 
| 6445 | 6446 | 
| 6446   return true; | 6447   return true; | 
| 6447 } | 6448 } | 
| 6448 | 6449 | 
| 6449 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6450 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 
| 6450     TransportDIB::Handle dib_handle) { | 6451     TransportDIB::Handle dib_handle) { | 
| 6451   TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6452   TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 
| 6452   RenderProcess::current()->ReleaseTransportDIB(dib); | 6453   RenderProcess::current()->ReleaseTransportDIB(dib); | 
| 6453 } | 6454 } | 
| OLD | NEW | 
|---|