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

Side by Side Diff: chrome/browser/extensions/api/app_window/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, 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_
7 7
8 #include "apps/app_window.h" 8 #include "apps/app_window.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 namespace api { 13 namespace api {
14 namespace app_window { 14 namespace app_window {
15 struct CreateWindowOptions; 15 struct CreateWindowOptions;
16 } 16 }
17 } 17 }
18 18
19 class AppWindowCreateFunction : public UIThreadExtensionFunction { 19 class AppWindowCreateFunction : public AsyncExtensionFunction {
20 public: 20 public:
21 AppWindowCreateFunction(); 21 AppWindowCreateFunction();
22 DECLARE_EXTENSION_FUNCTION("app.window.create", APP_WINDOW_CREATE) 22 DECLARE_EXTENSION_FUNCTION("app.window.create", APP_WINDOW_CREATE)
23 23
24 void SendDelayedResponse(); 24 void SendDelayedResponse();
25 25
26 protected: 26 protected:
27 virtual ~AppWindowCreateFunction() {} 27 virtual ~AppWindowCreateFunction() {}
28 virtual bool RunImpl() OVERRIDE; 28 virtual bool RunAsync() OVERRIDE;
29 29
30 private: 30 private:
31 bool GetBoundsSpec( 31 bool GetBoundsSpec(
32 const extensions::api::app_window::CreateWindowOptions& options, 32 const extensions::api::app_window::CreateWindowOptions& options,
33 apps::AppWindow::CreateParams* params, 33 apps::AppWindow::CreateParams* params,
34 std::string* error); 34 std::string* error);
35 35
36 apps::AppWindow::Frame GetFrameFromString(const std::string& frame_string); 36 apps::AppWindow::Frame GetFrameFromString(const std::string& frame_string);
37 bool GetFrameOptions( 37 bool GetFrameOptions(
38 const extensions::api::app_window::CreateWindowOptions& options, 38 const extensions::api::app_window::CreateWindowOptions& options,
39 apps::AppWindow::CreateParams* create_params); 39 apps::AppWindow::CreateParams* create_params);
40 void UpdateFrameOptionsForChannel( 40 void UpdateFrameOptionsForChannel(
41 apps::AppWindow::CreateParams* create_params); 41 apps::AppWindow::CreateParams* create_params);
42 42
43 bool inject_html_titlebar_; 43 bool inject_html_titlebar_;
44 }; 44 };
45 45
46 } // namespace extensions 46 } // namespace extensions
47 47
48 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_ 48 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/alarms/alarms_api.cc ('k') | chrome/browser/extensions/api/app_window/app_window_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698