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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.h

Issue 2868173002: Add PlatformLocalFrame class. (Closed)
Patch Set: this time with new file included Created 3 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 void SuspendAnimation(); 50 void SuspendAnimation();
51 void ResumeAnimation(); 51 void ResumeAnimation();
52 bool IsSuspended() const { return timeline_state_ >= kSuspended; } 52 bool IsSuspended() const { return timeline_state_ >= kSuspended; }
53 53
54 private: 54 private:
55 explicit SVGImageChromeClient(SVGImage*); 55 explicit SVGImageChromeClient(SVGImage*);
56 56
57 void ChromeDestroyed() override; 57 void ChromeDestroyed() override;
58 void InvalidateRect(const IntRect&) override; 58 void InvalidateRect(const IntRect&) override;
59 void ScheduleAnimation(LocalFrame*) override; 59 void ScheduleAnimation(const PlatformLocalFrame*) override;
60 60
61 void SetTimer(std::unique_ptr<TimerBase>); 61 void SetTimer(std::unique_ptr<TimerBase>);
62 void AnimationTimerFired(TimerBase*); 62 void AnimationTimerFired(TimerBase*);
63 63
64 SVGImage* image_; 64 SVGImage* image_;
65 std::unique_ptr<TimerBase> animation_timer_; 65 std::unique_ptr<TimerBase> animation_timer_;
66 enum { 66 enum {
67 kRunning, 67 kRunning,
68 kSuspended, 68 kSuspended,
69 kSuspendedWithAnimationPending, 69 kSuspendedWithAnimationPending,
70 } timeline_state_; 70 } timeline_state_;
71 71
72 FRIEND_TEST_ALL_PREFIXES(SVGImageTest, TimelineSuspendAndResume); 72 FRIEND_TEST_ALL_PREFIXES(SVGImageTest, TimelineSuspendAndResume);
73 FRIEND_TEST_ALL_PREFIXES(SVGImageTest, ResetAnimation); 73 FRIEND_TEST_ALL_PREFIXES(SVGImageTest, ResetAnimation);
74 }; 74 };
75 75
76 DEFINE_TYPE_CASTS(SVGImageChromeClient, 76 DEFINE_TYPE_CASTS(SVGImageChromeClient,
77 ChromeClient, 77 ChromeClient,
78 client, 78 client,
79 client->IsSVGImageChromeClient(), 79 client->IsSVGImageChromeClient(),
80 client.IsSVGImageChromeClient()); 80 client.IsSVGImageChromeClient());
81 81
82 } // namespace blink 82 } // namespace blink
83 83
84 #endif // SVGImageChromeClient_h 84 #endif // SVGImageChromeClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698