Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10254011: Add flag to experiments to force high DPI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove monitor_manager change made redundant by oshima's patch. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2659 matching lines...) Expand 10 before | Expand all | Expand 10 after
2670 navigation_state->set_transferred_request_request_id( 2670 navigation_state->set_transferred_request_request_id(
2671 params.transferred_request_request_id); 2671 params.transferred_request_request_id);
2672 } else { 2672 } else {
2673 navigation_state = NavigationState::CreateContentInitiated(); 2673 navigation_state = NavigationState::CreateContentInitiated();
2674 } 2674 }
2675 return navigation_state; 2675 return navigation_state;
2676 } 2676 }
2677 2677
2678 void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) { 2678 void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) {
2679 bool enable_viewport = 2679 bool enable_viewport =
2680 command_line.HasSwitch(switches::kEnableViewport); 2680 command_line.HasSwitch(switches::kEnableViewport) ||
2681 // Setting a default device scale factor forces enable_viewport on.
2682 webkit_preferences_.default_device_scale_factor > 1;
2681 bool enable_fixed_layout = 2683 bool enable_fixed_layout =
2682 command_line.HasSwitch(switches::kEnableFixedLayout); 2684 command_line.HasSwitch(switches::kEnableFixedLayout);
2683 2685
2684 webview()->enableFixedLayoutMode(enable_fixed_layout || enable_viewport); 2686 webview()->enableFixedLayoutMode(enable_fixed_layout || enable_viewport);
2685 webview()->settings()->setFixedElementsLayoutRelativeToFrame(true); 2687 webview()->settings()->setFixedElementsLayoutRelativeToFrame(true);
2686 2688
2687 if (enable_viewport) { 2689 if (enable_viewport) {
2688 webview()->settings()->setViewportEnabled(true); 2690 webview()->settings()->setViewportEnabled(true);
2689 } else if (enable_fixed_layout) { 2691 } else if (enable_fixed_layout) {
2690 std::string str = 2692 std::string str =
(...skipping 2583 matching lines...) Expand 10 before | Expand all | Expand 10 after
5274 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5276 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5275 return !!RenderThreadImpl::current()->compositor_thread(); 5277 return !!RenderThreadImpl::current()->compositor_thread();
5276 } 5278 }
5277 5279
5278 void RenderViewImpl::OnJavaBridgeInit() { 5280 void RenderViewImpl::OnJavaBridgeInit() {
5279 DCHECK(!java_bridge_dispatcher_.get()); 5281 DCHECK(!java_bridge_dispatcher_.get());
5280 #if defined(ENABLE_JAVA_BRIDGE) 5282 #if defined(ENABLE_JAVA_BRIDGE)
5281 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 5283 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
5282 #endif 5284 #endif
5283 } 5285 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698