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

Side by Side Diff: pdf/timer.h

Issue 2558573002: Revert "reland of Improve linearized pdf load/show time." (Closed)
Patch Set: Changes to make tests pass ... 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
« no previous file with comments | « pdf/range_set_unittest.cc ('k') | pdf/timer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PDF_TIMER_H_
6 #define PDF_TIMER_H_
7
8 #include "base/macros.h"
9 #include "ppapi/utility/completion_callback_factory.h"
10
11 namespace chrome_pdf {
12
13 // Timer implementation for pepper plugins, based on pp::Core::CallOnMainThread.
14 // We can not use base::Timer for plugins, because they have no
15 // base::MessageLoop, on which it is based.
16 class Timer {
17 public:
18 explicit Timer(int delay_in_milliseconds);
19 virtual ~Timer();
20
21 virtual void OnTimer() = 0;
22
23 private:
24 void PostCallback();
25 void TimerProc(int32_t result);
26
27 int delay_;
28 pp::CompletionCallbackFactory<Timer> callback_factory_;
29
30 DISALLOW_COPY_AND_ASSIGN(Timer);
31 };
32
33 } // namespace chrome_pdf
34
35 #endif // PDF_TIMER_H_
OLDNEW
« no previous file with comments | « pdf/range_set_unittest.cc ('k') | pdf/timer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698