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

Unified Diff: chrome/browser/jankometer.cc

Issue 8021009: Consolidate message observer API for win and aura (and touch). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed msw's comments Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/jankometer.cc
diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc
index eeb4a18efb3a7bdabb9eedae914b31d64a626fda..dd6fef20fd1a2b7da547b050da5364ac0ac4c419 100644
--- a/chrome/browser/jankometer.cc
+++ b/chrome/browser/jankometer.cc
@@ -304,9 +304,10 @@ class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>,
}
#if defined(OS_WIN)
- virtual void WillProcessMessage(const MSG& msg) {
+ virtual base::EventStatus WillProcessEvent(
+ const base::NativeEvent& event) OVERRIDE {
if (!helper_.MessageWillBeMeasured())
- return;
+ return base::EVENT_CONTINUE;
// GetMessageTime returns a LONG (signed 32-bit) and GetTickCount returns
// a DWORD (unsigned 32-bit). They both wrap around when the time is longer
// than they can hold. I'm not sure if GetMessageTime wraps around to 0,
@@ -322,11 +323,19 @@ class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>,
base::TimeDelta::FromMilliseconds(cur_time - cur_message_issue_time);
helper_.StartProcessingTimers(queueing_time);
+ return base::EVENT_CONTINUE;
}
- virtual void DidProcessMessage(const MSG& msg) {
+ virtual void DidProcessEvent(const ui::NativeEvent& event) OVERRIDE {
msw 2011/09/27 03:51:42 You probably meant base::NativeEvent here.
oshima 2011/09/27 16:39:39 Done.
helper_.EndProcessingTimers();
}
+#elif defined(TOUCH_UI) || defined(USE_AURA)
+ virtual base::EventStatus WillProcessEvent(
+ const base::NativeEvent& event) OVERRIDE {
+ return base::EVENT_CONTINUE;
+ }
+ virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE {
msw 2011/09/27 03:51:42 Add a blank line between these functions.
oshima 2011/09/27 16:39:39 Done.
+ }
#elif defined(TOOLKIT_USES_GTK)
virtual void WillProcessEvent(GdkEvent* event) {
if (!helper_.MessageWillBeMeasured())

Powered by Google App Engine
This is Rietveld 408576698