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

Unified Diff: apps/shell/browser/shell_apps_client.h

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: apps/shell/browser/shell_apps_client.h
diff --git a/apps/shell/browser/shell_apps_client.h b/apps/shell/browser/shell_apps_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..df96dbe20e5643faa07139bad792007681c52cfb
--- /dev/null
+++ b/apps/shell/browser/shell_apps_client.h
@@ -0,0 +1,44 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef APPS_SHELL_BROWSER_SHELL_APPS_CLIENT_H_
+#define APPS_SHELL_BROWSER_SHELL_APPS_CLIENT_H_
+
+#include "apps/apps_client.h"
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace apps {
+
+// The implementation of AppsClient for app_shell.
+class ShellAppsClient : public AppsClient {
+ public:
+ // For app_shell only a single browser context is supported.
+ explicit ShellAppsClient(content::BrowserContext* browser_context);
+ virtual ~ShellAppsClient();
+
+ private:
+ // apps::AppsClient implementation:
+ virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts()
+ OVERRIDE;
+ virtual bool CheckAppLaunch(content::BrowserContext* context,
+ const extensions::Extension* extension) OVERRIDE;
+ virtual AppWindow* CreateAppWindow(content::BrowserContext* context,
+ const extensions::Extension* extension)
+ OVERRIDE;
+ virtual void StartKeepAlive() OVERRIDE;
+ virtual void EndKeepAlive() OVERRIDE;
+
+ content::BrowserContext* browser_context_;
+
+ DISALLOW_COPY_AND_ASSIGN(ShellAppsClient);
+};
+
+} // namespace apps
+
+#endif // APPS_SHELL_BROWSER_SHELL_APPS_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698