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

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

Issue 257333002: Drive extension functions from ExtensionFunction::Run. The (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 6 years, 8 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
« no previous file with comments | « apps/shell/browser/api/shell/shell_api.cc ('k') | apps/shell/browser/shell_app_window_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell/browser/shell_app_window_api.h
diff --git a/apps/shell/browser/shell_app_window_api.h b/apps/shell/browser/shell_app_window_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb5eb375bc0c411b40d0cf0fc2c5bea20aa3d18e
--- /dev/null
+++ b/apps/shell/browser/shell_app_window_api.h
@@ -0,0 +1,31 @@
+// 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_APP_WINDOW_API_H_
+#define APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_
+
+#include "base/compiler_specific.h"
+#include "extensions/browser/extension_function.h"
+
+namespace extensions {
+
+// A simplified implementation of the chrome.app.window.create() function for
+// app_shell. Opens a fullscreen window and invokes the window callback. Most
+// of the response is stub data, but the JS contentWindow is valid.
+class ShellAppWindowCreateFunction : public AsyncExtensionFunction {
+ public:
+ ShellAppWindowCreateFunction();
+
+ // Don't use the APP_WINDOW_CREATE histogram so we don't pollute the
+ // statistics for the real Chrome implementation.
+ DECLARE_EXTENSION_FUNCTION("app.window.create", UNKNOWN);
+
+ private:
+ virtual ~ShellAppWindowCreateFunction();
+ virtual bool RunAsync() OVERRIDE;
+};
+
+} // namespace extensions
+
+#endif // APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_
« no previous file with comments | « apps/shell/browser/api/shell/shell_api.cc ('k') | apps/shell/browser/shell_app_window_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698