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

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

Issue 12722002: Enable pinch & scrollbars by default for CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, set default flag value to 'disabled'. Created 7 years, 8 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 | « content/renderer/gpu/render_widget_compositor.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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after
3334 command_line.GetSwitchValueASCII(switches::kEnableFixedLayout); 3334 command_line.GetSwitchValueASCII(switches::kEnableFixedLayout);
3335 std::vector<std::string> tokens; 3335 std::vector<std::string> tokens;
3336 base::SplitString(str, ',', &tokens); 3336 base::SplitString(str, ',', &tokens);
3337 if (tokens.size() == 2) { 3337 if (tokens.size() == 2) {
3338 int width, height; 3338 int width, height;
3339 if (base::StringToInt(tokens[0], &width) && 3339 if (base::StringToInt(tokens[0], &width) &&
3340 base::StringToInt(tokens[1], &height)) 3340 base::StringToInt(tokens[1], &height))
3341 webview()->setFixedLayoutSize(WebSize(width, height)); 3341 webview()->setFixedLayoutSize(WebSize(width, height));
3342 } 3342 }
3343 } 3343 }
3344 3344 float maxPageScaleFactor =
3345 if (command_line.HasSwitch(switches::kEnablePinch)) 3345 command_line.HasSwitch(switches::kEnablePinch) ? 4.f : 1.f ;
3346 webview()->setPageScaleFactorLimits(1, 4); 3346 webview()->setPageScaleFactorLimits(1, maxPageScaleFactor);
3347 else
3348 webview()->setPageScaleFactorLimits(1, 1);
3349 } 3347 }
3350 3348
3351 void RenderViewImpl::didStartProvisionalLoad(WebFrame* frame) { 3349 void RenderViewImpl::didStartProvisionalLoad(WebFrame* frame) {
3352 WebDataSource* ds = frame->provisionalDataSource(); 3350 WebDataSource* ds = frame->provisionalDataSource();
3353 3351
3354 // In fast/loader/stop-provisional-loads.html, we abort the load before this 3352 // In fast/loader/stop-provisional-loads.html, we abort the load before this
3355 // callback is invoked. 3353 // callback is invoked.
3356 if (!ds) 3354 if (!ds)
3357 return; 3355 return;
3358 3356
(...skipping 3260 matching lines...) Expand 10 before | Expand all | Expand 10 after
6619 WebURL url = icon_urls[i].iconURL(); 6617 WebURL url = icon_urls[i].iconURL();
6620 if (!url.isEmpty()) 6618 if (!url.isEmpty())
6621 urls.push_back(FaviconURL(url, 6619 urls.push_back(FaviconURL(url,
6622 ToFaviconType(icon_urls[i].iconType()))); 6620 ToFaviconType(icon_urls[i].iconType())));
6623 } 6621 }
6624 SendUpdateFaviconURL(urls); 6622 SendUpdateFaviconURL(urls);
6625 } 6623 }
6626 6624
6627 6625
6628 } // namespace content 6626 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698