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

Side by Side Diff: webkit/glue/webkitclient_impl.h

Issue 7129047: Implement monotonically increasing time for WebKit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/glue/webkitclient_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef WEBKIT_CLIENT_IMPL_H_ 5 #ifndef WEBKIT_CLIENT_IMPL_H_
6 #define WEBKIT_CLIENT_IMPL_H_ 6 #define WEBKIT_CLIENT_IMPL_H_
7 7
8 #include "base/platform_file.h" 8 #include "base/platform_file.h"
9 #include "base/timer.h" 9 #include "base/timer.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 WebKit::WebLocalizedString::Name name); 63 WebKit::WebLocalizedString::Name name);
64 virtual WebKit::WebString queryLocalizedString( 64 virtual WebKit::WebString queryLocalizedString(
65 WebKit::WebLocalizedString::Name name, int numeric_value); 65 WebKit::WebLocalizedString::Name name, int numeric_value);
66 virtual WebKit::WebString queryLocalizedString( 66 virtual WebKit::WebString queryLocalizedString(
67 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value); 67 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value);
68 virtual WebKit::WebString queryLocalizedString( 68 virtual WebKit::WebString queryLocalizedString(
69 WebKit::WebLocalizedString::Name name, 69 WebKit::WebLocalizedString::Name name,
70 const WebKit::WebString& value1, const WebKit::WebString& value2); 70 const WebKit::WebString& value1, const WebKit::WebString& value2);
71 virtual void suddenTerminationChanged(bool enabled) { } 71 virtual void suddenTerminationChanged(bool enabled) { }
72 virtual double currentTime(); 72 virtual double currentTime();
73 virtual double monotonicallyIncreasingTime();
73 virtual void cryptographicallyRandomValues( 74 virtual void cryptographicallyRandomValues(
74 unsigned char* buffer, size_t length); 75 unsigned char* buffer, size_t length);
75 virtual void setSharedTimerFiredFunction(void (*func)()); 76 virtual void setSharedTimerFiredFunction(void (*func)());
76 virtual void setSharedTimerFireTime(double fireTime); 77 virtual void setSharedTimerFireTime(double fireTime);
77 virtual void stopSharedTimer(); 78 virtual void stopSharedTimer();
78 virtual void callOnMainThread(void (*func)(void*), void* context); 79 virtual void callOnMainThread(void (*func)(void*), void* context);
79 80
80 void SuspendSharedTimer(); 81 void SuspendSharedTimer();
81 void ResumeSharedTimer(); 82 void ResumeSharedTimer();
82 83
83 private: 84 private:
84 void DoTimeout() { 85 void DoTimeout() {
85 if (shared_timer_func_ && !shared_timer_suspended_) 86 if (shared_timer_func_ && !shared_timer_suspended_)
86 shared_timer_func_(); 87 shared_timer_func_();
87 } 88 }
88 89
89 MessageLoop* main_loop_; 90 MessageLoop* main_loop_;
90 base::OneShotTimer<WebKitClientImpl> shared_timer_; 91 base::OneShotTimer<WebKitClientImpl> shared_timer_;
91 void (*shared_timer_func_)(); 92 void (*shared_timer_func_)();
92 double shared_timer_fire_time_; 93 double shared_timer_fire_time_;
93 int shared_timer_suspended_; // counter 94 int shared_timer_suspended_; // counter
94 WebThemeEngineImpl theme_engine_; 95 WebThemeEngineImpl theme_engine_;
95 }; 96 };
96 97
97 } // namespace webkit_glue 98 } // namespace webkit_glue
98 99
99 #endif // WEBKIT_CLIENT_IMPL_H_ 100 #endif // WEBKIT_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/webkitclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698