| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shell/browser/shell_apps_client.h" | 5 #include "apps/shell/browser/shell_apps_client.h" |
| 6 | 6 |
| 7 #include "apps/app_window.h" | 7 #include "apps/app_window.h" |
| 8 #include "apps/shell/browser/shell_app_window_delegate.h" | 8 #include "apps/shell/browser/shell_app_window_delegate.h" |
| 9 | 9 |
| 10 using content::BrowserContext; | 10 using content::BrowserContext; |
| 11 | 11 |
| 12 namespace apps { | 12 namespace apps { |
| 13 | 13 |
| 14 ShellAppsClient::ShellAppsClient(BrowserContext* browser_context) | 14 ShellAppsClient::ShellAppsClient(BrowserContext* browser_context) |
| 15 : browser_context_(browser_context) {} | 15 : browser_context_(browser_context) {} |
| 16 | 16 |
| 17 ShellAppsClient::~ShellAppsClient() {} | 17 ShellAppsClient::~ShellAppsClient() {} |
| 18 | 18 |
| 19 std::vector<BrowserContext*> ShellAppsClient::GetLoadedBrowserContexts() { | 19 std::vector<BrowserContext*> ShellAppsClient::GetLoadedBrowserContexts() { |
| 20 std::vector<BrowserContext*> browser_contexts; | 20 std::vector<BrowserContext*> browser_contexts; |
| 21 browser_contexts.push_back(browser_context_); | 21 browser_contexts.push_back(browser_context_); |
| 22 return browser_contexts; | 22 return browser_contexts; |
| 23 } | 23 } |
| 24 | 24 |
| 25 bool ShellAppsClient::CheckAppLaunch(BrowserContext* context, | |
| 26 const extensions::Extension* extension) { | |
| 27 return true; | |
| 28 } | |
| 29 | |
| 30 AppWindow* ShellAppsClient::CreateAppWindow( | 25 AppWindow* ShellAppsClient::CreateAppWindow( |
| 31 BrowserContext* context, | 26 BrowserContext* context, |
| 32 const extensions::Extension* extension) { | 27 const extensions::Extension* extension) { |
| 33 return new AppWindow(context, new ShellAppWindowDelegate, extension); | 28 return new AppWindow(context, new ShellAppWindowDelegate, extension); |
| 34 } | 29 } |
| 35 | 30 |
| 36 void ShellAppsClient::IncrementKeepAliveCount() {} | 31 void ShellAppsClient::IncrementKeepAliveCount() {} |
| 37 | 32 |
| 38 void ShellAppsClient::DecrementKeepAliveCount() {} | 33 void ShellAppsClient::DecrementKeepAliveCount() {} |
| 39 | 34 |
| 40 } // namespace apps | 35 } // namespace apps |
| OLD | NEW |