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

Unified Diff: chrome/browser/apps/chrome_apps_client.cc

Issue 166833004: Add support for chrome.app.window.create() to app_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (shell_app_window) Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/apps/chrome_apps_client.cc
diff --git a/chrome/browser/apps/chrome_apps_client.cc b/chrome/browser/apps/chrome_apps_client.cc
index 25d215365a02aee6058253bc2dc8fd995b085e36..0ce9022e86c661b0c6e0062534d13f0b2369863d 100644
--- a/chrome/browser/apps/chrome_apps_client.cc
+++ b/chrome/browser/apps/chrome_apps_client.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/apps/chrome_apps_client.h"
+#include "apps/app_window.h"
#include "base/memory/singleton.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -14,6 +15,13 @@
#include "win8/util/win8_util.h"
#endif
+// TODO(jamescook): We probably shouldn't compile this class at all on Android.
+// See http://crbug.com/343612
+#if !defined(OS_ANDROID)
+#include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/ui/apps/chrome_app_window_delegate.h"
+#endif
+
ChromeAppsClient::ChromeAppsClient() {}
ChromeAppsClient::~ChromeAppsClient() {}
@@ -47,3 +55,25 @@ bool ChromeAppsClient::CheckAppLaunch(content::BrowserContext* context,
#endif
return true;
}
+
+apps::AppWindow* ChromeAppsClient::CreateAppWindow(
+ content::BrowserContext* context,
+ const extensions::Extension* extension) {
+#if defined(OS_ANDROID)
+ return NULL;
+#else
+ return new apps::AppWindow(context, new ChromeAppWindowDelegate, extension);
+#endif
+}
+
+void ChromeAppsClient::StartKeepAlive() {
+#if !defined(OS_ANDROID)
+ chrome::StartKeepAlive();
+#endif
+}
+
+void ChromeAppsClient::EndKeepAlive() {
+#if !defined(OS_ANDROID)
+ chrome::EndKeepAlive();
+#endif
+}

Powered by Google App Engine
This is Rietveld 408576698