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

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

Issue 655713003: Standardize usage of virtual/override/final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « media/audio/sounds/test_data.h ('k') | media/audio/virtual_audio_input_stream.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "media/audio/audio_input_controller.h" 9 #include "media/audio/audio_input_controller.h"
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 AudioManager* audio_manager, 57 AudioManager* audio_manager,
58 const AudioParameters& audio_parameters, 58 const AudioParameters& audio_parameters,
59 EventHandler* event_handler, 59 EventHandler* event_handler,
60 SyncWriter* sync_writer, 60 SyncWriter* sync_writer,
61 UserInputMonitor* user_input_monitor); 61 UserInputMonitor* user_input_monitor);
62 62
63 // Returns the event handler installed on the AudioInputController. 63 // Returns the event handler installed on the AudioInputController.
64 EventHandler* event_handler() const { return event_handler_; } 64 EventHandler* event_handler() const { return event_handler_; }
65 65
66 // Notifies the TestAudioControllerOpened() event to the delegate (if any). 66 // Notifies the TestAudioControllerOpened() event to the delegate (if any).
67 virtual void Record() override; 67 void Record() override;
68 68
69 // Ensure that the closure is run on the audio-manager thread. 69 // Ensure that the closure is run on the audio-manager thread.
70 virtual void Close(const base::Closure& closed_task) override; 70 void Close(const base::Closure& closed_task) override;
71 71
72 const AudioParameters& audio_parameters() const { 72 const AudioParameters& audio_parameters() const {
73 return audio_parameters_; 73 return audio_parameters_;
74 } 74 }
75 75
76 protected: 76 protected:
77 virtual ~TestAudioInputController(); 77 ~TestAudioInputController() override;
78 78
79 private: 79 private:
80 AudioParameters audio_parameters_; 80 AudioParameters audio_parameters_;
81 81
82 // These are not owned by us and expected to be valid for this object's 82 // These are not owned by us and expected to be valid for this object's
83 // lifetime. 83 // lifetime.
84 TestAudioInputControllerFactory* factory_; 84 TestAudioInputControllerFactory* factory_;
85 EventHandler* event_handler_; 85 EventHandler* event_handler_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(TestAudioInputController); 87 DISALLOW_COPY_AND_ASSIGN(TestAudioInputController);
88 }; 88 };
89 89
90 typedef TestAudioInputController::Delegate TestAudioInputControllerDelegate; 90 typedef TestAudioInputController::Delegate TestAudioInputControllerDelegate;
91 91
92 // Simple AudioInputController::Factory method that creates 92 // Simple AudioInputController::Factory method that creates
93 // TestAudioInputControllers. 93 // TestAudioInputControllers.
94 class TestAudioInputControllerFactory : public AudioInputController::Factory { 94 class TestAudioInputControllerFactory : public AudioInputController::Factory {
95 public: 95 public:
96 TestAudioInputControllerFactory(); 96 TestAudioInputControllerFactory();
97 virtual ~TestAudioInputControllerFactory(); 97 ~TestAudioInputControllerFactory() override;
98 98
99 // AudioInputController::Factory methods. 99 // AudioInputController::Factory methods.
100 virtual AudioInputController* Create( 100 AudioInputController* Create(
101 AudioManager* audio_manager, 101 AudioManager* audio_manager,
102 AudioInputController::EventHandler* event_handler, 102 AudioInputController::EventHandler* event_handler,
103 AudioParameters params, 103 AudioParameters params,
104 UserInputMonitor* user_input_monitor) override; 104 UserInputMonitor* user_input_monitor) override;
105 105
106 void set_delegate(TestAudioInputControllerDelegate* delegate) { 106 void set_delegate(TestAudioInputControllerDelegate* delegate) {
107 delegate_ = delegate; 107 delegate_ = delegate;
108 } 108 }
109 109
110 TestAudioInputController* controller() const { return controller_; } 110 TestAudioInputController* controller() const { return controller_; }
(...skipping 10 matching lines...) Expand all
121 121
122 // The delegate for tests for receiving audio controller events. 122 // The delegate for tests for receiving audio controller events.
123 TestAudioInputControllerDelegate* delegate_; 123 TestAudioInputControllerDelegate* delegate_;
124 124
125 DISALLOW_COPY_AND_ASSIGN(TestAudioInputControllerFactory); 125 DISALLOW_COPY_AND_ASSIGN(TestAudioInputControllerFactory);
126 }; 126 };
127 127
128 } // namespace media 128 } // namespace media
129 129
130 #endif // MEDIA_AUDIO_TEST_AUDIO_INPUT_CONTROLLER_FACTORY_H_ 130 #endif // MEDIA_AUDIO_TEST_AUDIO_INPUT_CONTROLLER_FACTORY_H_
OLDNEW
« no previous file with comments | « media/audio/sounds/test_data.h ('k') | media/audio/virtual_audio_input_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698