| OLD | NEW |
| 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 BASE_EVENT_RECORDER_H_ | 5 #ifndef BASE_EVENT_RECORDER_H_ |
| 6 #define BASE_EVENT_RECORDER_H_ | 6 #define BASE_EVENT_RECORDER_H_ |
| 7 | 7 |
| 8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // C-style callbacks for the EventRecorder. | 67 // C-style callbacks for the EventRecorder. |
| 68 // Used for internal purposes only. | 68 // Used for internal purposes only. |
| 69 LRESULT RecordWndProc(int nCode, WPARAM wParam, LPARAM lParam); | 69 LRESULT RecordWndProc(int nCode, WPARAM wParam, LPARAM lParam); |
| 70 LRESULT PlaybackWndProc(int nCode, WPARAM wParam, LPARAM lParam); | 70 LRESULT PlaybackWndProc(int nCode, WPARAM wParam, LPARAM lParam); |
| 71 #endif | 71 #endif |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 // Create a new EventRecorder. Events are saved to the file filename. | 74 // Create a new EventRecorder. Events are saved to the file filename. |
| 75 // If the file already exists, it will be deleted before recording | 75 // If the file already exists, it will be deleted before recording |
| 76 // starts. | 76 // starts. |
| 77 explicit EventRecorder() | 77 EventRecorder() |
| 78 : is_recording_(false), | 78 : is_recording_(false), |
| 79 is_playing_(false), | 79 is_playing_(false), |
| 80 #if defined(OS_WIN) | 80 #if defined(OS_WIN) |
| 81 journal_hook_(NULL), | 81 journal_hook_(NULL), |
| 82 file_(NULL), | 82 file_(NULL), |
| 83 #endif | 83 #endif |
| 84 playback_first_msg_time_(0), | 84 playback_first_msg_time_(0), |
| 85 playback_start_time_(0) { | 85 playback_start_time_(0) { |
| 86 #if defined(OS_WIN) | 86 #if defined(OS_WIN) |
| 87 memset(&playback_msg_, 0, sizeof(playback_msg_)); | 87 memset(&playback_msg_, 0, sizeof(playback_msg_)); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 100 #endif | 100 #endif |
| 101 int playback_first_msg_time_; | 101 int playback_first_msg_time_; |
| 102 int playback_start_time_; | 102 int playback_start_time_; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(EventRecorder); | 104 DISALLOW_COPY_AND_ASSIGN(EventRecorder); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace base | 107 } // namespace base |
| 108 | 108 |
| 109 #endif // BASE_EVENT_RECORDER_H_ | 109 #endif // BASE_EVENT_RECORDER_H_ |
| OLD | NEW |