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

Unified Diff: apps/shell/browser/api/shell/shell_api.h

Issue 254473011: Introduce chrome.shell.createWindow stub API for app_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (shell-api) 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
Index: apps/shell/browser/api/shell/shell_api.h
diff --git a/apps/shell/browser/api/shell/shell_api.h b/apps/shell/browser/api/shell/shell_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..70ea875f014b2cd5ce257203ee9ba4f80ec0410c
--- /dev/null
+++ b/apps/shell/browser/api/shell/shell_api.h
@@ -0,0 +1,34 @@
+// 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_API_SHELL_SHELL_API_H_
+#define APPS_SHELL_BROWSER_API_SHELL_SHELL_API_H_
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "extensions/browser/extension_function.h"
+
+namespace apps {
+
+// Implementation of the chrome.shell.createWindow() function for app_shell.
+// Opens a fullscreen window and invokes the window callback to allow access to
+// the JS contentWindow.
+class ShellCreateWindowFunction : public UIThreadExtensionFunction {
+ public:
+ ShellCreateWindowFunction();
+
+ // Don't use the APP_WINDOW_CREATE histogram so we don't pollute the
+ // statistics for the real Chrome implementation.
+ DECLARE_EXTENSION_FUNCTION("shell.createWindow", UNKNOWN);
Yoyo Zhou 2014/04/29 22:10:00 Are we ok with not having histograms for this func
James Cook 2014/04/29 22:53:52 Added one.
+
+ private:
+ virtual ~ShellCreateWindowFunction();
+ virtual bool RunImpl() OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(ShellCreateWindowFunction);
+};
+
+} // namespace apps
+
+#endif // APPS_SHELL_BROWSER_API_SHELL_SHELL_API_H_

Powered by Google App Engine
This is Rietveld 408576698