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

Side by Side Diff: content/shell/renderer/test_runner/event_sender.cc

Issue 738463003: Don't set page scale limits inside EventSender::setPageScaleFactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shell/renderer/test_runner/event_sender.h" 5 #include "content/shell/renderer/test_runner/event_sender.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "content/public/common/page_zoom.h" 10 #include "content/public/common/page_zoom.h"
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 const std::vector<WebTestProxyBase*>& window_list = 1462 const std::vector<WebTestProxyBase*>& window_list =
1463 interfaces_->GetWindowList(); 1463 interfaces_->GetWindowList();
1464 1464
1465 for (size_t i = 0; i < window_list.size(); ++i) { 1465 for (size_t i = 0; i < window_list.size(); ++i) {
1466 window_list.at(i)->GetWebView()->setZoomLevel( 1466 window_list.at(i)->GetWebView()->setZoomLevel(
1467 ZoomFactorToZoomLevel(zoom_factor)); 1467 ZoomFactorToZoomLevel(zoom_factor));
1468 } 1468 }
1469 } 1469 }
1470 1470
1471 void EventSender::SetPageScaleFactor(float scale_factor, int x, int y) { 1471 void EventSender::SetPageScaleFactor(float scale_factor, int x, int y) {
1472 view_->setPageScaleFactorLimits(scale_factor, scale_factor);
1473 view_->setPageScaleFactor(scale_factor, WebPoint(x, y)); 1472 view_->setPageScaleFactor(scale_factor, WebPoint(x, y));
1474 } 1473 }
1475 1474
1476 void EventSender::ClearTouchPoints() { 1475 void EventSender::ClearTouchPoints() {
1477 touch_points_.clear(); 1476 touch_points_.clear();
1478 } 1477 }
1479 1478
1480 void EventSender::ThrowTouchPointError() { 1479 void EventSender::ThrowTouchPointError() {
1481 v8::Isolate* isolate = blink::mainThreadIsolate(); 1480 v8::Isolate* isolate = blink::mainThreadIsolate();
1482 isolate->ThrowException(v8::Exception::TypeError( 1481 isolate->ThrowException(v8::Exception::TypeError(
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 } 2301 }
2303 default: 2302 default:
2304 NOTREACHED(); 2303 NOTREACHED();
2305 } 2304 }
2306 } 2305 }
2307 2306
2308 replaying_saved_events_ = false; 2307 replaying_saved_events_ = false;
2309 } 2308 }
2310 2309
2311 } // namespace content 2310 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698