OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "base/containers/scoped_ptr_hash_map.h" | 13 #include "base/containers/scoped_ptr_hash_map.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
19 #include "base/thread_task_runner_handle.h" | 19 #include "base/thread_task_runner_handle.h" |
20 #include "base/threading/thread_checker.h" | 20 #include "base/threading/thread_checker.h" |
21 #include "chrome/browser/media/router/issue.h" | 21 #include "chrome/browser/media/router/issue.h" |
22 #include "chrome/browser/media/router/issue_manager.h" | 22 #include "chrome/browser/media/router/issue_manager.h" |
23 #include "chrome/browser/media/router/media_router.h" | 23 #include "chrome/browser/media/router/media_router.h" |
24 #include "chrome/browser/media/router/media_router.mojom.h" | 24 #include "chrome/browser/media/router/media_router.mojom.h" |
25 | 25 |
| 26 class TestMediaRouterAction; |
| 27 |
26 namespace content { | 28 namespace content { |
27 class BrowserContext; | 29 class BrowserContext; |
28 } | 30 } |
29 | 31 |
30 namespace extensions { | 32 namespace extensions { |
31 class EventPageTracker; | 33 class EventPageTracker; |
32 } | 34 } |
33 | 35 |
34 namespace media_router { | 36 namespace media_router { |
35 | 37 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 return media_route_provider_extension_id_; | 90 return media_route_provider_extension_id_; |
89 } | 91 } |
90 | 92 |
91 void set_instance_id_for_test(const std::string& instance_id) { | 93 void set_instance_id_for_test(const std::string& instance_id) { |
92 instance_id_ = instance_id; | 94 instance_id_ = instance_id; |
93 } | 95 } |
94 | 96 |
95 private: | 97 private: |
96 friend class MediaRouterFactory; | 98 friend class MediaRouterFactory; |
97 friend class MediaRouterMojoTest; | 99 friend class MediaRouterMojoTest; |
| 100 friend class ::TestMediaRouterAction; |
98 | 101 |
99 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoExtensionTest, | 102 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoExtensionTest, |
100 DeferredBindingAndSuspension); | 103 DeferredBindingAndSuspension); |
101 | 104 |
102 // Standard constructor, used by | 105 // Standard constructor, used by |
103 // MediaRouterMojoImplFactory::GetApiForBrowserContext. | 106 // MediaRouterMojoImplFactory::GetApiForBrowserContext. |
104 explicit MediaRouterMojoImpl( | 107 explicit MediaRouterMojoImpl( |
105 extensions::EventPageTracker* event_page_tracker); | 108 extensions::EventPageTracker* event_page_tracker); |
106 | 109 |
107 // Binds |this| to a Mojo interface request, so that clients can acquire a | 110 // Binds |this| to a Mojo interface request, so that clients can acquire a |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 std::string instance_id_; | 205 std::string instance_id_; |
203 | 206 |
204 base::ThreadChecker thread_checker_; | 207 base::ThreadChecker thread_checker_; |
205 | 208 |
206 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); | 209 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); |
207 }; | 210 }; |
208 | 211 |
209 } // namespace media_router | 212 } // namespace media_router |
210 | 213 |
211 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ | 214 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ |
OLD | NEW |