| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/chrome_bubble_manager_factory.h" |
| 6 |
| 7 #include "chrome/browser/ui/chrome_bubble_manager.h" |
| 8 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 9 |
| 10 // static |
| 11 ChromeBubbleManager* ChromeBubbleManagerFactory::GetForBrowserContext( |
| 12 content::BrowserContext* context) { |
| 13 return static_cast<ChromeBubbleManager*>( |
| 14 GetInstance()->GetServiceForBrowserContext(context, true)); |
| 15 } |
| 16 |
| 17 // static |
| 18 ChromeBubbleManagerFactory* ChromeBubbleManagerFactory::GetInstance() { |
| 19 return Singleton<ChromeBubbleManagerFactory>::get(); |
| 20 } |
| 21 |
| 22 ChromeBubbleManagerFactory::ChromeBubbleManagerFactory() |
| 23 : BrowserContextKeyedServiceFactory( |
| 24 "ChromeBubbleManager", |
| 25 BrowserContextDependencyManager::GetInstance()) { |
| 26 } |
| 27 |
| 28 ChromeBubbleManagerFactory::~ChromeBubbleManagerFactory() { |
| 29 } |
| 30 |
| 31 KeyedService* ChromeBubbleManagerFactory::BuildServiceInstanceFor( |
| 32 content::BrowserContext* context) const { |
| 33 return new ChromeBubbleManager(); |
| 34 } |
| OLD | NEW |