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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2720723004: Remove FrameHost setDefaultPageScaleLimits/UserAgentPageScaleConstraints (Closed)
Patch Set: Rebase Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 void Internals::setPageScaleFactorLimits(float minScaleFactor, 2240 void Internals::setPageScaleFactorLimits(float minScaleFactor,
2241 float maxScaleFactor, 2241 float maxScaleFactor,
2242 ExceptionState& exceptionState) { 2242 ExceptionState& exceptionState) {
2243 if (!m_document->page()) { 2243 if (!m_document->page()) {
2244 exceptionState.throwDOMException( 2244 exceptionState.throwDOMException(
2245 InvalidAccessError, "The document's page cannot be retrieved."); 2245 InvalidAccessError, "The document's page cannot be retrieved.");
2246 return; 2246 return;
2247 } 2247 }
2248 2248
2249 Page* page = m_document->page(); 2249 Page* page = m_document->page();
2250 page->frameHost().setDefaultPageScaleLimits(minScaleFactor, maxScaleFactor); 2250 page->setDefaultPageScaleLimits(minScaleFactor, maxScaleFactor);
2251 } 2251 }
2252 2252
2253 bool Internals::magnifyScaleAroundAnchor(float scaleFactor, float x, float y) { 2253 bool Internals::magnifyScaleAroundAnchor(float scaleFactor, float x, float y) {
2254 if (!frame()) 2254 if (!frame())
2255 return false; 2255 return false;
2256 2256
2257 return frame()->host()->visualViewport().magnifyScaleAroundAnchor( 2257 return frame()->host()->visualViewport().magnifyScaleAroundAnchor(
2258 scaleFactor, FloatPoint(x, y)); 2258 scaleFactor, FloatPoint(x, y));
2259 } 2259 }
2260 2260
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
3176 3176
3177 void Internals::crash() { 3177 void Internals::crash() {
3178 CHECK(false) << "Intentional crash"; 3178 CHECK(false) << "Intentional crash";
3179 } 3179 }
3180 3180
3181 void Internals::setIsLowEndDevice(bool isLowEndDevice) { 3181 void Internals::setIsLowEndDevice(bool isLowEndDevice) {
3182 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); 3182 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice);
3183 } 3183 }
3184 3184
3185 } // namespace blink 3185 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameHost.cpp ('k') | third_party/WebKit/Source/web/WebDevToolsFrontendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698