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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 prefs.threaded_html_parser = | 547 prefs.threaded_html_parser = |
548 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser); | 548 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser); |
549 prefs.experimental_websocket_enabled = | 549 prefs.experimental_websocket_enabled = |
550 command_line.HasSwitch(switches::kEnableExperimentalWebSocket); | 550 command_line.HasSwitch(switches::kEnableExperimentalWebSocket); |
551 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) { | 551 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) { |
552 prefs.pinch_virtual_viewport_enabled = true; | 552 prefs.pinch_virtual_viewport_enabled = true; |
553 prefs.pinch_overlay_scrollbar_thickness = 10; | 553 prefs.pinch_overlay_scrollbar_thickness = 10; |
554 } | 554 } |
555 | 555 |
556 #if defined(OS_ANDROID) | 556 #if defined(OS_ANDROID) |
| 557 prefs.use_solid_color_scrollbars = true; |
557 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 558 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
558 switches::kDisableGestureRequirementForMediaPlayback); | 559 switches::kDisableGestureRequirementForMediaPlayback); |
559 #endif | 560 #endif |
560 | 561 |
561 prefs.touch_enabled = ui::AreTouchEventsEnabled(); | 562 prefs.touch_enabled = ui::AreTouchEventsEnabled(); |
562 prefs.device_supports_touch = prefs.touch_enabled && | 563 prefs.device_supports_touch = prefs.touch_enabled && |
563 ui::IsTouchDevicePresent(); | 564 ui::IsTouchDevicePresent(); |
564 #if defined(OS_ANDROID) | 565 #if defined(OS_ANDROID) |
565 prefs.device_supports_mouse = false; | 566 prefs.device_supports_mouse = false; |
566 #endif | 567 #endif |
(...skipping 3187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3754 gfx::Size WebContentsImpl::GetSizeForNewRenderView() const { | 3755 gfx::Size WebContentsImpl::GetSizeForNewRenderView() const { |
3755 gfx::Size size; | 3756 gfx::Size size; |
3756 if (delegate_) | 3757 if (delegate_) |
3757 size = delegate_->GetSizeForNewRenderView(this); | 3758 size = delegate_->GetSizeForNewRenderView(this); |
3758 if (size.IsEmpty()) | 3759 if (size.IsEmpty()) |
3759 size = view_->GetContainerSize(); | 3760 size = view_->GetContainerSize(); |
3760 return size; | 3761 return size; |
3761 } | 3762 } |
3762 | 3763 |
3763 } // namespace content | 3764 } // namespace content |
OLD | NEW |