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

Side by Side Diff: content/browser/mock_resource_context.h

Issue 9433006: Remove GetAudioManager and GetMediaStreamManager from ResourceContext. The reason is the content mo… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 10 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 | « content/browser/browser_main_loop.cc ('k') | content/browser/mock_resource_context.cc » ('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 CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_ 5 #ifndef CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_
6 #define CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_ 6 #define CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/browser/resource_context.h" 11 #include "content/public/browser/resource_context.h"
12 #include "net/url_request/url_request_context.h" 12 #include "net/url_request/url_request_context.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 class MockResourceContext : public ResourceContext { 16 class MockResourceContext : public ResourceContext {
17 public: 17 public:
18 MockResourceContext(); 18 MockResourceContext();
19 explicit MockResourceContext(net::URLRequestContext* context); 19 explicit MockResourceContext(net::URLRequestContext* context);
20 virtual ~MockResourceContext(); 20 virtual ~MockResourceContext();
21 21
22 void set_request_context(net::URLRequestContext* context) { 22 void set_request_context(net::URLRequestContext* context) {
23 test_request_context_ = context; 23 test_request_context_ = context;
24 } 24 }
25 25
26 void set_media_observer(MediaObserver* observer) { 26 void set_media_observer(MediaObserver* observer) {
27 media_observer_ = observer; 27 media_observer_ = observer;
28 } 28 }
29 void set_media_stream_manager(media_stream::MediaStreamManager* manager) {
30 media_stream_manager_ = manager;
31 }
32 void set_audio_manager(AudioManager* manager) { audio_manager_ = manager; }
33 29
34 // ResourceContext implementation: 30 // ResourceContext implementation:
35 virtual net::HostResolver* GetHostResolver() OVERRIDE; 31 virtual net::HostResolver* GetHostResolver() OVERRIDE;
36 virtual net::URLRequestContext* GetRequestContext() OVERRIDE; 32 virtual net::URLRequestContext* GetRequestContext() OVERRIDE;
37 virtual MediaObserver* GetMediaObserver() OVERRIDE; 33 virtual MediaObserver* GetMediaObserver() OVERRIDE;
38 virtual media_stream::MediaStreamManager* GetMediaStreamManager() OVERRIDE;
39 virtual AudioManager* GetAudioManager() OVERRIDE;
40 34
41 private: 35 private:
42 scoped_refptr<net::URLRequestContext> test_request_context_; 36 scoped_refptr<net::URLRequestContext> test_request_context_;
43 MediaObserver* media_observer_; 37 MediaObserver* media_observer_;
44 media_stream::MediaStreamManager* media_stream_manager_;
45 AudioManager* audio_manager_;
46 }; 38 };
47 39
48 } // namespace content 40 } // namespace content
49 41
50 #endif // CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_ 42 #endif // CONTENT_BROWSER_MOCK_RESOURCE_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/mock_resource_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698