| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 MEDIA_AUDIO_SOUNDS_TEST_UTILS_H_ | 5 #ifndef MEDIA_AUDIO_SOUNDS_TEST_UTILS_H_ |
| 6 #define MEDIA_AUDIO_SOUNDS_TEST_UTILS_H_ | 6 #define MEDIA_AUDIO_SOUNDS_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 "\x01\x00\x02\x00\x80\xbb\x00\x00\x00\x77\x01\x00\x02\x00\x10\x00" | 22 "\x01\x00\x02\x00\x80\xbb\x00\x00\x00\x77\x01\x00\x02\x00\x10\x00" |
| 23 "data\x04\x00\x00\x00\x01\x00\x01\x00"; | 23 "data\x04\x00\x00\x00\x01\x00\x01\x00"; |
| 24 | 24 |
| 25 class TestObserver : public AudioStreamHandler::TestObserver { | 25 class TestObserver : public AudioStreamHandler::TestObserver { |
| 26 public: | 26 public: |
| 27 TestObserver(const base::Closure& quit); | 27 TestObserver(const base::Closure& quit); |
| 28 virtual ~TestObserver(); | 28 virtual ~TestObserver(); |
| 29 | 29 |
| 30 // AudioStreamHandler::TestObserver implementation: | 30 // AudioStreamHandler::TestObserver implementation: |
| 31 virtual void OnPlay() OVERRIDE; | 31 virtual void OnPlay() OVERRIDE; |
| 32 virtual void OnReplay() OVERRIDE; |
| 32 virtual void OnStop(size_t cursor) OVERRIDE; | 33 virtual void OnStop(size_t cursor) OVERRIDE; |
| 33 | 34 |
| 34 int num_play_requests() const { return num_play_requests_; } | 35 int num_play_requests() const { return num_play_requests_; } |
| 36 int num_replays() const { return num_replays_; } |
| 35 int num_stop_requests() const { return num_stop_requests_; } | 37 int num_stop_requests() const { return num_stop_requests_; } |
| 36 int cursor() const { return cursor_; } | 38 int cursor() const { return cursor_; } |
| 37 | 39 |
| 38 private: | 40 private: |
| 39 base::MessageLoop* loop_; | 41 base::MessageLoop* loop_; |
| 40 base::Closure quit_; | 42 base::Closure quit_; |
| 41 | 43 |
| 42 int num_play_requests_; | 44 int num_play_requests_; |
| 45 int num_replays_; |
| 43 int num_stop_requests_; | 46 int num_stop_requests_; |
| 44 int cursor_; | 47 int cursor_; |
| 45 | 48 |
| 46 DISALLOW_COPY_AND_ASSIGN(TestObserver); | 49 DISALLOW_COPY_AND_ASSIGN(TestObserver); |
| 47 }; | 50 }; |
| 48 | 51 |
| 49 } // namespace media | 52 } // namespace media |
| 50 | 53 |
| 51 #endif // MEDIA_AUDIO_SOUNDS_TEST_UTILS_H_ | 54 #endif // MEDIA_AUDIO_SOUNDS_TEST_UTILS_H_ |
| OLD | NEW |