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

Side by Side Diff: apps/app_lifetime_monitor.cc

Issue 494033002: Move AppWindow to extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded include in chrome_shell_delegate.cc Created 6 years, 3 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.h ('k') | apps/app_lifetime_monitor_factory.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 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.h" 5 #include "apps/app_lifetime_monitor.h"
6 6
7 #include "apps/app_window.h"
8 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
10 #include "content/public/browser/notification_details.h" 9 #include "content/public/browser/notification_details.h"
11 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
11 #include "extensions/browser/app_window/app_window.h"
12 #include "extensions/browser/extension_host.h" 12 #include "extensions/browser/extension_host.h"
13 #include "extensions/browser/notification_types.h" 13 #include "extensions/browser/notification_types.h"
14 #include "extensions/common/extension.h" 14 #include "extensions/common/extension.h"
15 15
16 namespace apps { 16 namespace apps {
17 17
18 using extensions::AppWindow;
19 using extensions::AppWindowRegistry;
18 using extensions::Extension; 20 using extensions::Extension;
19 using extensions::ExtensionHost; 21 using extensions::ExtensionHost;
20 22
21 AppLifetimeMonitor::AppLifetimeMonitor(Profile* profile) 23 AppLifetimeMonitor::AppLifetimeMonitor(Profile* profile)
22 : profile_(profile) { 24 : profile_(profile) {
23 registrar_.Add(this, 25 registrar_.Add(this,
24 extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, 26 extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
25 content::NotificationService::AllSources()); 27 content::NotificationService::AllSources());
26 registrar_.Add(this, 28 registrar_.Add(this,
27 extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED, 29 extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 134
133 void AppLifetimeMonitor::NotifyAppStop(const std::string& app_id) { 135 void AppLifetimeMonitor::NotifyAppStop(const std::string& app_id) {
134 FOR_EACH_OBSERVER(Observer, observers_, OnAppStop(profile_, app_id)); 136 FOR_EACH_OBSERVER(Observer, observers_, OnAppStop(profile_, app_id));
135 } 137 }
136 138
137 void AppLifetimeMonitor::NotifyChromeTerminating() { 139 void AppLifetimeMonitor::NotifyChromeTerminating() {
138 FOR_EACH_OBSERVER(Observer, observers_, OnChromeTerminating()); 140 FOR_EACH_OBSERVER(Observer, observers_, OnChromeTerminating());
139 } 141 }
140 142
141 } // namespace apps 143 } // namespace apps
OLDNEW
« no previous file with comments | « apps/app_lifetime_monitor.h ('k') | apps/app_lifetime_monitor_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698