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

Side by Side Diff: base/event_recorder.h

Issue 7461141: Rename BASE_API to BASE_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « base/environment.h ('k') | base/file_descriptor_shuffle.h » ('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 BASE_EVENT_RECORDER_H_ 5 #ifndef BASE_EVENT_RECORDER_H_
6 #define BASE_EVENT_RECORDER_H_ 6 #define BASE_EVENT_RECORDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/base_api.h" 9 #include "base/base_export.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 12
13 #if defined(OS_WIN) 13 #if defined(OS_WIN)
14 #include <stdio.h> 14 #include <stdio.h>
15 #include <string.h> 15 #include <string.h>
16 #include <windows.h> 16 #include <windows.h>
17 #endif 17 #endif
18 18
19 class FilePath; 19 class FilePath;
20 20
21 namespace base { 21 namespace base {
22 22
23 // A class for recording and playing back keyboard and mouse input events. 23 // A class for recording and playing back keyboard and mouse input events.
24 // 24 //
25 // Note - if you record events, and the playback with the windows in 25 // Note - if you record events, and the playback with the windows in
26 // different sizes or positions, the playback will fail. When 26 // different sizes or positions, the playback will fail. When
27 // recording and playing, you should move the relevant windows 27 // recording and playing, you should move the relevant windows
28 // to constant sizes and locations. 28 // to constant sizes and locations.
29 // TODO(mbelshe) For now this is a singleton. I believe that this class 29 // TODO(mbelshe) For now this is a singleton. I believe that this class
30 // could be easily modified to: 30 // could be easily modified to:
31 // support two simultaneous recorders 31 // support two simultaneous recorders
32 // be playing back events while already recording events. 32 // be playing back events while already recording events.
33 // Why? Imagine if the product had a "record a macro" feature. 33 // Why? Imagine if the product had a "record a macro" feature.
34 // You might be recording globally, while recording or playing back 34 // You might be recording globally, while recording or playing back
35 // a macro. I don't think two playbacks make sense. 35 // a macro. I don't think two playbacks make sense.
36 class BASE_API EventRecorder { 36 class BASE_EXPORT EventRecorder {
37 public: 37 public:
38 // Get the singleton EventRecorder. 38 // Get the singleton EventRecorder.
39 // We can only handle one recorder/player at a time. 39 // We can only handle one recorder/player at a time.
40 static EventRecorder* current() { 40 static EventRecorder* current() {
41 if (!current_) 41 if (!current_)
42 current_ = new EventRecorder(); 42 current_ = new EventRecorder();
43 return current_; 43 return current_;
44 } 44 }
45 45
46 // Starts recording events. 46 // Starts recording events.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 #endif 101 #endif
102 int playback_first_msg_time_; 102 int playback_first_msg_time_;
103 int playback_start_time_; 103 int playback_start_time_;
104 104
105 DISALLOW_COPY_AND_ASSIGN(EventRecorder); 105 DISALLOW_COPY_AND_ASSIGN(EventRecorder);
106 }; 106 };
107 107
108 } // namespace base 108 } // namespace base
109 109
110 #endif // BASE_EVENT_RECORDER_H_ 110 #endif // BASE_EVENT_RECORDER_H_
OLDNEW
« no previous file with comments | « base/environment.h ('k') | base/file_descriptor_shuffle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698