OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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 CONTENT_PUBLIC_TEST_CLIPBOARD_WRITE_OBSERVER_H_ | |
6 #define CONTENT_PUBLIC_TEST_CLIPBOARD_WRITE_OBSERVER_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "ui/base/clipboard/clipboard.h" | |
10 | |
11 namespace content { | |
12 | |
13 class MessageLoopRunner; | |
14 | |
15 // ClipboardWriteObserver allows user to wait until Clipboard::WriteObjects has | |
16 // finished. | |
17 class ClipboardWriteObserver : | |
jam
2013/02/11 21:28:53
i try to keep the number of files in content/publi
vasilii
2013/02/12 15:58:32
I don't understand how callback can help me. This
vasilii
2013/02/12 17:25:18
Please note that the current OnWriteObjects() not
vasilii
2013/02/13 16:57:26
Done.
| |
18 public ui::Clipboard::ClipboardObserverForTesting { | |
19 public: | |
20 explicit ClipboardWriteObserver(ui::Clipboard* clipboard, | |
dcheng
2013/02/11 22:58:21
explicit is only required for single-argument ctor
vasilii
2013/02/12 15:58:32
Done.
| |
21 ui::Clipboard::Buffer buffer); | |
22 virtual ~ClipboardWriteObserver(); | |
23 | |
24 void Wait(); | |
25 private: | |
26 virtual void OnWriteObjects(ui::Clipboard::Buffer buffer) OVERRIDE; | |
27 | |
28 bool seen_; | |
29 bool running_; | |
30 ui::Clipboard::Buffer buffer_; | |
31 scoped_refptr<MessageLoopRunner> message_loop_runner_; | |
32 ui::Clipboard* clipboard_; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(ClipboardWriteObserver); | |
35 }; | |
36 | |
37 } // namespace content | |
38 #endif // CONTENT_PUBLIC_TEST_CLIPBOARD_WRITE_OBSERVER_H_ | |
OLD | NEW |