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

Side by Side 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: appshell Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_ 5 #ifndef APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_
6 #define APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_ 6 #define APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "extensions/browser/extension_function.h" 9 #include "extensions/browser/extension_function.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 12
13 // A simplified implementation of the chrome.app.window.create() function for 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 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. 15 // of the response is stub data, but the JS contentWindow is valid.
16 class ShellAppWindowCreateFunction : public UIThreadExtensionFunction { 16 class ShellAppWindowCreateFunction : public AsyncExtensionFunction {
17 public: 17 public:
18 ShellAppWindowCreateFunction(); 18 ShellAppWindowCreateFunction();
19 19
20 // Don't use the APP_WINDOW_CREATE histogram so we don't pollute the 20 // Don't use the APP_WINDOW_CREATE histogram so we don't pollute the
21 // statistics for the real Chrome implementation. 21 // statistics for the real Chrome implementation.
22 DECLARE_EXTENSION_FUNCTION("app.window.create", UNKNOWN); 22 DECLARE_EXTENSION_FUNCTION("app.window.create", UNKNOWN);
23 23
24 private: 24 private:
25 virtual ~ShellAppWindowCreateFunction(); 25 virtual ~ShellAppWindowCreateFunction();
26 virtual bool RunImpl() OVERRIDE; 26 virtual bool RunAsync() OVERRIDE;
27 }; 27 };
28 28
29 } // namespace extensions 29 } // namespace extensions
30 30
31 #endif // APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_ 31 #endif // APPS_SHELL_BROWSER_SHELL_APP_WINDOW_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698