| OLD | NEW |
| 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 "chrome/browser/apps/chrome_apps_client.h" | 5 #include "chrome/browser/apps/chrome_apps_client.h" |
| 6 | 6 |
| 7 #include "apps/shell_window.h" |
| 7 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 8 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/lifetime/application_lifetime.h" |
| 9 #include "chrome/browser/profiles/profile_manager.h" | 11 #include "chrome/browser/profiles/profile_manager.h" |
| 10 #include "chrome/browser/ui/apps/app_metro_infobar_delegate_win.h" | 12 #include "chrome/browser/ui/apps/app_metro_infobar_delegate_win.h" |
| 13 #include "chrome/browser/ui/apps/chrome_shell_window_delegate.h" |
| 11 #include "extensions/common/extension.h" | 14 #include "extensions/common/extension.h" |
| 12 | 15 |
| 13 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
| 14 #include "win8/util/win8_util.h" | 17 #include "win8/util/win8_util.h" |
| 15 #endif | 18 #endif |
| 16 | 19 |
| 17 ChromeAppsClient::ChromeAppsClient() {} | 20 ChromeAppsClient::ChromeAppsClient() {} |
| 18 | 21 |
| 19 ChromeAppsClient::~ChromeAppsClient() {} | 22 ChromeAppsClient::~ChromeAppsClient() {} |
| 20 | 23 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 40 if (win8::IsSingleWindowMetroMode()) { | 43 if (win8::IsSingleWindowMetroMode()) { |
| 41 AppMetroInfoBarDelegateWin::Create( | 44 AppMetroInfoBarDelegateWin::Create( |
| 42 Profile::FromBrowserContext(context), | 45 Profile::FromBrowserContext(context), |
| 43 AppMetroInfoBarDelegateWin::LAUNCH_PACKAGED_APP, | 46 AppMetroInfoBarDelegateWin::LAUNCH_PACKAGED_APP, |
| 44 extension->id()); | 47 extension->id()); |
| 45 return false; | 48 return false; |
| 46 } | 49 } |
| 47 #endif | 50 #endif |
| 48 return true; | 51 return true; |
| 49 } | 52 } |
| 53 |
| 54 apps::ShellWindow* ChromeAppsClient::CreateShellWindow( |
| 55 content::BrowserContext* context, |
| 56 const extensions::Extension* extension) { |
| 57 return new apps::ShellWindow( |
| 58 context, new ChromeShellWindowDelegate, extension); |
| 59 } |
| 60 |
| 61 void ChromeAppsClient::StartKeepAlive() { |
| 62 chrome::StartKeepAlive(); |
| 63 } |
| 64 |
| 65 void ChromeAppsClient::EndKeepAlive() { |
| 66 chrome::EndKeepAlive(); |
| 67 } |
| OLD | NEW |