| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_ | |
| 6 #define APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "extensions/browser/extension_function.h" | |
| 10 | |
| 11 namespace extensions { | |
| 12 | |
| 13 // A simplified implementation of the chrome.app.window.create() function for | |
| 14 // app_shell. Opens a fullscreen window and invokes the window callback. Most | |
| 15 // of the response is stub data, but the JS contentWindow is valid. | |
| 16 class ShellAppWindowCreateFunction : public AsyncExtensionFunction { | |
| 17 public: | |
| 18 ShellAppWindowCreateFunction(); | |
| 19 | |
| 20 // Don't use the APP_WINDOW_CREATE histogram so we don't pollute the | |
| 21 // statistics for the real Chrome implementation. | |
| 22 DECLARE_EXTENSION_FUNCTION("app.window.create", UNKNOWN); | |
| 23 | |
| 24 private: | |
| 25 virtual ~ShellAppWindowCreateFunction(); | |
| 26 virtual bool RunAsync() OVERRIDE; | |
| 27 }; | |
| 28 | |
| 29 } // namespace extensions | |
| 30 | |
| 31 #endif // APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_ | |
| OLD | NEW |