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

Side by Side Diff: media/audio/test_audio_input_controller_factory.h

Issue 10067035: RefCounted types should not have public destructors, media/ and gpu/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
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 MEDIA_AUDIO_TEST_AUDIO_INPUT_CONTROLLER_FACTORY_H_ 5 #ifndef MEDIA_AUDIO_TEST_AUDIO_INPUT_CONTROLLER_FACTORY_H_
6 #define MEDIA_AUDIO_TEST_AUDIO_INPUT_CONTROLLER_FACTORY_H_ 6 #define MEDIA_AUDIO_TEST_AUDIO_INPUT_CONTROLLER_FACTORY_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "media/audio/audio_input_controller.h" 10 #include "media/audio/audio_input_controller.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // ... 42 // ...
43 // // Reset factory. 43 // // Reset factory.
44 // AudioInputController::set_factory(NULL); 44 // AudioInputController::set_factory(NULL);
45 45
46 class TestAudioInputController : public AudioInputController { 46 class TestAudioInputController : public AudioInputController {
47 public: 47 public:
48 TestAudioInputController(TestAudioInputControllerFactory* factory, 48 TestAudioInputController(TestAudioInputControllerFactory* factory,
49 AudioManager* audio_manager, 49 AudioManager* audio_manager,
50 EventHandler* event_handler, 50 EventHandler* event_handler,
51 SyncWriter* sync_writer); 51 SyncWriter* sync_writer);
52 virtual ~TestAudioInputController();
53 52
54 // Returns the event handler installed on the AudioInputController. 53 // Returns the event handler installed on the AudioInputController.
55 EventHandler* event_handler() const { return event_handler_; } 54 EventHandler* event_handler() const { return event_handler_; }
56 55
57 // Overriden to do nothing. It is assumed the caller will notify the event 56 // Overriden to do nothing. It is assumed the caller will notify the event
58 // handler with recorded data and other events. 57 // handler with recorded data and other events.
59 virtual void Record() OVERRIDE {} 58 virtual void Record() OVERRIDE {}
60 59
61 // Ensure that the closure is run on the audio-manager thread. 60 // Ensure that the closure is run on the audio-manager thread.
62 virtual void Close(const base::Closure& closed_task) OVERRIDE; 61 virtual void Close(const base::Closure& closed_task) OVERRIDE;
63 62
64 private: 63 private:
64 virtual ~TestAudioInputController();
65
65 // These are not owned by us and expected to be valid for this object's 66 // These are not owned by us and expected to be valid for this object's
66 // lifetime. 67 // lifetime.
67 TestAudioInputControllerFactory* factory_; 68 TestAudioInputControllerFactory* factory_;
68 EventHandler* event_handler_; 69 EventHandler* event_handler_;
69 70
70 DISALLOW_COPY_AND_ASSIGN(TestAudioInputController); 71 DISALLOW_COPY_AND_ASSIGN(TestAudioInputController);
71 }; 72 };
72 73
73 // Simple AudioInputController::Factory method that creates 74 // Simple AudioInputController::Factory method that creates
74 // TestAudioInputControllers. 75 // TestAudioInputControllers.
(...skipping 18 matching lines...) Expand all
93 94
94 // The caller of Create owns this object. 95 // The caller of Create owns this object.
95 TestAudioInputController* controller_; 96 TestAudioInputController* controller_;
96 97
97 DISALLOW_COPY_AND_ASSIGN(TestAudioInputControllerFactory); 98 DISALLOW_COPY_AND_ASSIGN(TestAudioInputControllerFactory);
98 }; 99 };
99 100
100 } // namespace media 101 } // namespace media
101 102
102 #endif // MEDIA_AUDIO_TEST_AUDIO_INPUT_CONTROLLER_FACTORY_H_ 103 #endif // MEDIA_AUDIO_TEST_AUDIO_INPUT_CONTROLLER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698