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

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

Issue 1984593002: Remove OwnPtr::release() calls in web/ & wtf/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with trunk. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 break; 729 break;
730 endActiveFlingAnimation(); 730 endActiveFlingAnimation();
731 m_client->cancelScheduledContentIntents(); 731 m_client->cancelScheduledContentIntents();
732 m_positionOnFlingStart = WebPoint(event.x, event.y); 732 m_positionOnFlingStart = WebPoint(event.x, event.y);
733 m_globalPositionOnFlingStart = WebPoint(event.globalX, event.globalY); 733 m_globalPositionOnFlingStart = WebPoint(event.globalX, event.globalY);
734 m_flingModifier = event.modifiers; 734 m_flingModifier = event.modifiers;
735 m_flingSourceDevice = event.sourceDevice; 735 m_flingSourceDevice = event.sourceDevice;
736 DCHECK_NE(m_flingSourceDevice, WebGestureDeviceUninitialized); 736 DCHECK_NE(m_flingSourceDevice, WebGestureDeviceUninitialized);
737 OwnPtr<WebGestureCurve> flingCurve = adoptPtr(Platform::current()->creat eFlingAnimationCurve(event.sourceDevice, WebFloatPoint(event.data.flingStart.vel ocityX, event.data.flingStart.velocityY), WebSize())); 737 OwnPtr<WebGestureCurve> flingCurve = adoptPtr(Platform::current()->creat eFlingAnimationCurve(event.sourceDevice, WebFloatPoint(event.data.flingStart.vel ocityX, event.data.flingStart.velocityY), WebSize()));
738 DCHECK(flingCurve); 738 DCHECK(flingCurve);
739 m_gestureAnimation = WebActiveGestureAnimation::createAtAnimationStart(f lingCurve.release(), this); 739 m_gestureAnimation = WebActiveGestureAnimation::createAtAnimationStart(s td::move(flingCurve), this);
740 scheduleAnimation(); 740 scheduleAnimation();
741 eventResult = WebInputEventResult::HandledSystem; 741 eventResult = WebInputEventResult::HandledSystem;
742 742
743 // Plugins may need to see GestureFlingStart to balance 743 // Plugins may need to see GestureFlingStart to balance
744 // GestureScrollBegin (since the former replaces GestureScrollEnd when 744 // GestureScrollBegin (since the former replaces GestureScrollEnd when
745 // transitioning to a fling). 745 // transitioning to a fling).
746 PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event); 746 PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event);
747 // TODO(dtapuska): Why isn't the response used? 747 // TODO(dtapuska): Why isn't the response used?
748 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEvent(platfo rmEvent); 748 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEvent(platfo rmEvent);
749 749
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 951
952 void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar ameters& parameters) 952 void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar ameters& parameters)
953 { 953 {
954 TRACE_EVENT0("blink", "WebViewImpl::transferActiveWheelFlingAnimation"); 954 TRACE_EVENT0("blink", "WebViewImpl::transferActiveWheelFlingAnimation");
955 DCHECK(!m_gestureAnimation); 955 DCHECK(!m_gestureAnimation);
956 m_positionOnFlingStart = parameters.point; 956 m_positionOnFlingStart = parameters.point;
957 m_globalPositionOnFlingStart = parameters.globalPoint; 957 m_globalPositionOnFlingStart = parameters.globalPoint;
958 m_flingModifier = parameters.modifiers; 958 m_flingModifier = parameters.modifiers;
959 OwnPtr<WebGestureCurve> curve = adoptPtr(Platform::current()->createFlingAni mationCurve(parameters.sourceDevice, WebFloatPoint(parameters.delta), parameters .cumulativeScroll)); 959 OwnPtr<WebGestureCurve> curve = adoptPtr(Platform::current()->createFlingAni mationCurve(parameters.sourceDevice, WebFloatPoint(parameters.delta), parameters .cumulativeScroll));
960 DCHECK(curve); 960 DCHECK(curve);
961 m_gestureAnimation = WebActiveGestureAnimation::createWithTimeOffset(curve.r elease(), this, parameters.startTime); 961 m_gestureAnimation = WebActiveGestureAnimation::createWithTimeOffset(std::mo ve(curve), this, parameters.startTime);
962 DCHECK_NE(parameters.sourceDevice, WebGestureDeviceUninitialized); 962 DCHECK_NE(parameters.sourceDevice, WebGestureDeviceUninitialized);
963 m_flingSourceDevice = parameters.sourceDevice; 963 m_flingSourceDevice = parameters.sourceDevice;
964 scheduleAnimation(); 964 scheduleAnimation();
965 } 965 }
966 966
967 bool WebViewImpl::endActiveFlingAnimation() 967 bool WebViewImpl::endActiveFlingAnimation()
968 { 968 {
969 if (m_gestureAnimation) { 969 if (m_gestureAnimation) {
970 m_gestureAnimation.clear(); 970 m_gestureAnimation.clear();
971 m_flingSourceDevice = WebGestureDeviceUninitialized; 971 m_flingSourceDevice = WebGestureDeviceUninitialized;
(...skipping 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after
4524 { 4524 {
4525 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4525 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4526 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4526 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4527 if (!page()) 4527 if (!page())
4528 return 1; 4528 return 1;
4529 4529
4530 return page()->deviceScaleFactor(); 4530 return page()->deviceScaleFactor();
4531 } 4531 }
4532 4532
4533 } // namespace blink 4533 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp ('k') | third_party/WebKit/Source/wtf/DequeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698