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

Side by Side Diff: apps/app_lifetime_monitor_factory.cc

Issue 166573005: Rename apps::ShellWindow to apps::AppWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, nits (rename) Created 6 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 | « apps/app_lifetime_monitor.cc ('k') | apps/app_load_service.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "apps/app_lifetime_monitor_factory.h" 5 #include "apps/app_lifetime_monitor_factory.h"
6 6
7 #include "apps/app_lifetime_monitor.h" 7 #include "apps/app_lifetime_monitor.h"
8 #include "apps/shell_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h" 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h"
11 #include "extensions/browser/extensions_browser_client.h" 11 #include "extensions/browser/extensions_browser_client.h"
12 12
13 namespace apps { 13 namespace apps {
14 14
15 // static 15 // static
16 AppLifetimeMonitor* AppLifetimeMonitorFactory::GetForProfile(Profile* profile) { 16 AppLifetimeMonitor* AppLifetimeMonitorFactory::GetForProfile(Profile* profile) {
17 return static_cast<AppLifetimeMonitor*>( 17 return static_cast<AppLifetimeMonitor*>(
18 GetInstance()->GetServiceForBrowserContext(profile, false)); 18 GetInstance()->GetServiceForBrowserContext(profile, false));
19 } 19 }
20 20
21 AppLifetimeMonitorFactory* AppLifetimeMonitorFactory::GetInstance() { 21 AppLifetimeMonitorFactory* AppLifetimeMonitorFactory::GetInstance() {
22 return Singleton<AppLifetimeMonitorFactory>::get(); 22 return Singleton<AppLifetimeMonitorFactory>::get();
23 } 23 }
24 24
25 AppLifetimeMonitorFactory::AppLifetimeMonitorFactory() 25 AppLifetimeMonitorFactory::AppLifetimeMonitorFactory()
26 : BrowserContextKeyedServiceFactory( 26 : BrowserContextKeyedServiceFactory(
27 "AppLifetimeMonitor", 27 "AppLifetimeMonitor",
28 BrowserContextDependencyManager::GetInstance()) { 28 BrowserContextDependencyManager::GetInstance()) {
29 DependsOn(ShellWindowRegistry::Factory::GetInstance()); 29 DependsOn(AppWindowRegistry::Factory::GetInstance());
30 } 30 }
31 31
32 AppLifetimeMonitorFactory::~AppLifetimeMonitorFactory() {} 32 AppLifetimeMonitorFactory::~AppLifetimeMonitorFactory() {}
33 33
34 BrowserContextKeyedService* AppLifetimeMonitorFactory::BuildServiceInstanceFor( 34 BrowserContextKeyedService* AppLifetimeMonitorFactory::BuildServiceInstanceFor(
35 content::BrowserContext* profile) const { 35 content::BrowserContext* profile) const {
36 return new AppLifetimeMonitor(static_cast<Profile*>(profile)); 36 return new AppLifetimeMonitor(static_cast<Profile*>(profile));
37 } 37 }
38 38
39 bool AppLifetimeMonitorFactory::ServiceIsCreatedWithBrowserContext() const { 39 bool AppLifetimeMonitorFactory::ServiceIsCreatedWithBrowserContext() const {
40 return true; 40 return true;
41 } 41 }
42 42
43 content::BrowserContext* AppLifetimeMonitorFactory::GetBrowserContextToUse( 43 content::BrowserContext* AppLifetimeMonitorFactory::GetBrowserContextToUse(
44 content::BrowserContext* context) const { 44 content::BrowserContext* context) const {
45 return extensions::ExtensionsBrowserClient::Get()-> 45 return extensions::ExtensionsBrowserClient::Get()->
46 GetOriginalContext(context); 46 GetOriginalContext(context);
47 } 47 }
48 48
49 } // namespace apps 49 } // namespace apps
OLDNEW
« no previous file with comments | « apps/app_lifetime_monitor.cc ('k') | apps/app_load_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698