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

Side by Side Diff: apps/app_shim/app_shim_handler_mac.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_restore_service.cc ('k') | apps/app_shim/extension_app_shim_handler_mac.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_shim/app_shim_handler_mac.h" 5 #include "apps/app_shim/app_shim_handler_mac.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "apps/app_window_registry.h"
10 #include "base/bind.h" 9 #include "base/bind.h"
11 #include "base/logging.h" 10 #include "base/logging.h"
12 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
13 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
14 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
15 #include "chrome/browser/lifetime/application_lifetime.h" 14 #include "chrome/browser/lifetime/application_lifetime.h"
16 #include "chrome/browser/ui/app_list/app_list_service.h" 15 #include "chrome/browser/ui/app_list/app_list_service.h"
17 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
19 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
19 #include "extensions/browser/app_window/app_window_registry.h"
20 20
21 namespace apps { 21 namespace apps {
22 22
23 namespace { 23 namespace {
24 24
25 void TerminateIfNoAppWindows() { 25 void TerminateIfNoAppWindows() {
26 bool app_windows_left = 26 bool app_windows_left =
27 apps::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0); 27 extensions::AppWindowRegistry::IsAppWindowRegisteredInAnyProfile(0);
28 if (!app_windows_left && 28 if (!app_windows_left &&
29 !AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE) 29 !AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)
30 ->IsAppListVisible()) { 30 ->IsAppListVisible()) {
31 chrome::AttemptExit(); 31 chrome::AttemptExit();
32 } 32 }
33 } 33 }
34 34
35 class AppShimHandlerRegistry : public content::NotificationObserver { 35 class AppShimHandlerRegistry : public content::NotificationObserver {
36 public: 36 public:
37 static AppShimHandlerRegistry* GetInstance() { 37 static AppShimHandlerRegistry* GetInstance() {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void AppShimHandler::MaybeTerminate() { 147 void AppShimHandler::MaybeTerminate() {
148 AppShimHandlerRegistry::GetInstance()->MaybeTerminate(); 148 AppShimHandlerRegistry::GetInstance()->MaybeTerminate();
149 } 149 }
150 150
151 // static 151 // static
152 bool AppShimHandler::ShouldRestoreSession() { 152 bool AppShimHandler::ShouldRestoreSession() {
153 return AppShimHandlerRegistry::GetInstance()->ShouldRestoreSession(); 153 return AppShimHandlerRegistry::GetInstance()->ShouldRestoreSession();
154 } 154 }
155 155
156 } // namespace apps 156 } // namespace apps
OLDNEW
« no previous file with comments | « apps/app_restore_service.cc ('k') | apps/app_shim/extension_app_shim_handler_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698