1 // Copyright (c) 2013 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.
5 #include "chrome/browser/browser_process_platform_part_mac.h"
7 #include "apps/app_shim/app_shim_host_manager_mac.h"
8 #include "chrome/browser/chrome_browser_application_mac.h"
9 #include "chrome/browser/ui/app_list/app_list_service.h"
11 BrowserProcessPlatformPart::BrowserProcessPlatformPart() {
14 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() {
17 void BrowserProcessPlatformPart::StartTearDown() {
18 app_shim_host_manager_.reset();
21 void BrowserProcessPlatformPart::AttemptExit() {
22 // On the Mac, the application continues to run once all windows are closed.
23 // Terminate will result in a CloseAllBrowsers() call, and once (and if)
24 // that is done, will cause the application to exit cleanly.
25 chrome_browser_application_mac::Terminate();
28 void BrowserProcessPlatformPart::PreMainMessageLoopRun() {
29 app_shim_host_manager_.reset(new AppShimHostManager);
30 AppListService::InitAll(NULL);
33 AppShimHostManager* BrowserProcessPlatformPart::app_shim_host_manager() {
34 return app_shim_host_manager_.get();