| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_EVENT_PAGE_REQUEST_MANAGER_FACTORY_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_EVENT_PAGE_REQUEST_MANAGER_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/singleton.h" |
| 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 11 |
| 12 namespace content { |
| 13 class BrowserContext; |
| 14 } |
| 15 |
| 16 namespace media_router { |
| 17 |
| 18 class EventPageRequestManager; |
| 19 |
| 20 // A factory that creates EventPageRequestManager for a given BrowserContext. |
| 21 class EventPageRequestManagerFactory |
| 22 : public BrowserContextKeyedServiceFactory { |
| 23 public: |
| 24 static EventPageRequestManager* GetApiForBrowserContext( |
| 25 content::BrowserContext* context); |
| 26 |
| 27 static EventPageRequestManagerFactory* GetInstance(); |
| 28 |
| 29 private: |
| 30 friend struct base::DefaultSingletonTraits<EventPageRequestManagerFactory>; |
| 31 |
| 32 EventPageRequestManagerFactory(); |
| 33 ~EventPageRequestManagerFactory() override; |
| 34 |
| 35 KeyedService* BuildServiceInstanceFor( |
| 36 content::BrowserContext* context) const override; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(EventPageRequestManagerFactory); |
| 39 }; |
| 40 |
| 41 } // namespace media_router |
| 42 |
| 43 #endif // CHROME_BROWSER_MEDIA_ROUTER_EVENT_PAGE_REQUEST_MANAGER_FACTORY_H_ |
| OLD | NEW |