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

Side by Side Diff: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm

Issue 2570463005: Retire ThreadState::registerPreFinalizer<T>() (Closed)
Patch Set: Created 4 years 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) 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010, 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 693
694 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea) 694 ScrollAnimatorMac::ScrollAnimatorMac(ScrollableArea* scrollableArea)
695 : ScrollAnimatorBase(scrollableArea), 695 : ScrollAnimatorBase(scrollableArea),
696 m_taskRunner(Platform::current() 696 m_taskRunner(Platform::current()
697 ->currentThread() 697 ->currentThread()
698 ->scheduler() 698 ->scheduler()
699 ->timerTaskRunner() 699 ->timerTaskRunner()
700 ->clone()), 700 ->clone()),
701 m_haveScrolledSincePageLoad(false), 701 m_haveScrolledSincePageLoad(false),
702 m_needsScrollerStyleUpdate(false) { 702 m_needsScrollerStyleUpdate(false) {
703 ThreadState::current()->registerPreFinalizer(this);
704
705 m_scrollAnimationHelperDelegate.adoptNS( 703 m_scrollAnimationHelperDelegate.adoptNS(
706 [[BlinkScrollAnimationHelperDelegate alloc] initWithScrollAnimator:this]); 704 [[BlinkScrollAnimationHelperDelegate alloc] initWithScrollAnimator:this]);
707 m_scrollAnimationHelper.adoptNS( 705 m_scrollAnimationHelper.adoptNS(
708 [[NSClassFromString(@"NSScrollAnimationHelper") alloc] 706 [[NSClassFromString(@"NSScrollAnimationHelper") alloc]
709 initWithDelegate:m_scrollAnimationHelperDelegate.get()]); 707 initWithDelegate:m_scrollAnimationHelperDelegate.get()]);
710 708
711 m_scrollbarPainterControllerDelegate.adoptNS( 709 m_scrollbarPainterControllerDelegate.adoptNS(
712 [[BlinkScrollbarPainterControllerDelegate alloc] 710 [[BlinkScrollbarPainterControllerDelegate alloc]
713 initWithScrollableArea:scrollableArea]); 711 initWithScrollableArea:scrollableArea]);
714 m_scrollbarPainterController = 712 m_scrollbarPainterController =
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 rectInViewCoordinates = 1079 rectInViewCoordinates =
1082 verticalScrollbar->convertToContainingWidget(scrollerThumb); 1080 verticalScrollbar->convertToContainingWidget(scrollerThumb);
1083 1081
1084 if (rectInViewCoordinates == m_visibleScrollerThumbRect) 1082 if (rectInViewCoordinates == m_visibleScrollerThumbRect)
1085 return; 1083 return;
1086 1084
1087 m_visibleScrollerThumbRect = rectInViewCoordinates; 1085 m_visibleScrollerThumbRect = rectInViewCoordinates;
1088 } 1086 }
1089 1087
1090 } // namespace blink 1088 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698