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

Side by Side Diff: third_party/WebKit/Source/web/DevToolsEmulator.cpp

Issue 2014493002: Rename OwnPtr::clear() to reset() in web/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "web/DevToolsEmulator.h" 5 #include "web/DevToolsEmulator.h"
6 6
7 #include "core/frame/FrameHost.h" 7 #include "core/frame/FrameHost.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/page/Page.h" 10 #include "core/page/Page.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 m_lastPinchAnchorDip->scale(pageScaleFactor, pageScaleFactor); 370 m_lastPinchAnchorDip->scale(pageScaleFactor, pageScaleFactor);
371 } 371 }
372 if (gestureEvent.type() == PlatformEvent::GesturePinchUpdate && m_lastPi nchAnchorCss) { 372 if (gestureEvent.type() == PlatformEvent::GesturePinchUpdate && m_lastPi nchAnchorCss) {
373 float newPageScaleFactor = pageScaleFactor * gestureEvent.scale(); 373 float newPageScaleFactor = pageScaleFactor * gestureEvent.scale();
374 IntPoint anchorCss(*m_lastPinchAnchorDip.get()); 374 IntPoint anchorCss(*m_lastPinchAnchorDip.get());
375 anchorCss.scale(1.f / newPageScaleFactor, 1.f / newPageScaleFactor); 375 anchorCss.scale(1.f / newPageScaleFactor, 1.f / newPageScaleFactor);
376 m_webViewImpl->setPageScaleFactor(newPageScaleFactor); 376 m_webViewImpl->setPageScaleFactor(newPageScaleFactor);
377 m_webViewImpl->mainFrame()->setScrollOffset(toIntSize(*m_lastPinchAn chorCss.get() - toIntSize(anchorCss))); 377 m_webViewImpl->mainFrame()->setScrollOffset(toIntSize(*m_lastPinchAn chorCss.get() - toIntSize(anchorCss)));
378 } 378 }
379 if (gestureEvent.type() == PlatformEvent::GesturePinchEnd) { 379 if (gestureEvent.type() == PlatformEvent::GesturePinchEnd) {
380 m_lastPinchAnchorCss.clear(); 380 m_lastPinchAnchorCss.reset();
381 m_lastPinchAnchorDip.clear(); 381 m_lastPinchAnchorDip.reset();
382 } 382 }
383 return true; 383 return true;
384 } 384 }
385 385
386 return false; 386 return false;
387 } 387 }
388 388
389 } // namespace blink 389 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/AssociatedURLLoader.cpp ('k') | third_party/WebKit/Source/web/ExternalPopupMenu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698