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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
656 #if defined(OS_CHROMEOS) | 656 #if defined(OS_CHROMEOS) |
657 prefs.gesture_tap_highlight_enabled = !command_line.HasSwitch( | 657 prefs.gesture_tap_highlight_enabled = !command_line.HasSwitch( |
658 switches::kDisableGestureTapHighlight); | 658 switches::kDisableGestureTapHighlight); |
659 #else | 659 #else |
660 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 660 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
661 switches::kEnableGestureTapHighlight); | 661 switches::kEnableGestureTapHighlight); |
662 #endif | 662 #endif |
663 | 663 |
664 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 664 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
665 | 665 |
666 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); | 666 prefs.viewport_meta_enabled = |
667 command_line.HasSwitch(switches::kEnableViewportMeta); | |
668 | |
669 prefs.viewport_enabled = | |
670 command_line.HasSwitch(switches::kEnableViewport) || | |
671 prefs.viewport_meta_enabled; | |
aelias_OOO_until_Jul13
2013/10/25 04:13:27
This effectively turns on @viewport support for An
kenneth.r.christiansen
2013/10/25 06:27:01
There is a separate runtime flag for that only ena
bokan
2013/10/25 17:19:33
--viewport-enabled is already on in Android and I
bokan
2013/10/25 17:19:33
I was actually unaware that --enable-viewport does
aelias_OOO_until_Jul13
2013/10/31 20:54:26
Yes, as discussed on the Blink-side patch, it's al
| |
672 | |
673 prefs.scale_viewport_on_resize = | |
674 command_line.HasSwitch(switches::kScaleViewportOnResize); | |
667 | 675 |
668 prefs.deferred_image_decoding_enabled = | 676 prefs.deferred_image_decoding_enabled = |
669 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || | 677 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || |
670 cc::switches::IsImplSidePaintingEnabled(); | 678 cc::switches::IsImplSidePaintingEnabled(); |
671 | 679 |
672 prefs.spatial_navigation_enabled = command_line.HasSwitch( | 680 prefs.spatial_navigation_enabled = command_line.HasSwitch( |
673 switches::kEnableSpatialNavigation); | 681 switches::kEnableSpatialNavigation); |
674 | 682 |
675 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 683 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); |
676 | 684 |
(...skipping 3181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3858 } | 3866 } |
3859 | 3867 |
3860 void WebContentsImpl::OnFrameRemoved( | 3868 void WebContentsImpl::OnFrameRemoved( |
3861 RenderViewHostImpl* render_view_host, | 3869 RenderViewHostImpl* render_view_host, |
3862 int64 frame_id) { | 3870 int64 frame_id) { |
3863 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3871 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3864 FrameDetached(render_view_host, frame_id)); | 3872 FrameDetached(render_view_host, frame_id)); |
3865 } | 3873 } |
3866 | 3874 |
3867 } // namespace content | 3875 } // namespace content |
OLD | NEW |