#ifndef CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_
#define CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_
#include "apps/app_window.h"
#include "extensions/browser/extension_function.h"
namespace extensions {
namespace api {
namespace app_window {
struct CreateWindowOptions;
}
}
class AppWindowCreateFunction : public UIThreadExtensionFunction {
public:
AppWindowCreateFunction();
DECLARE_EXTENSION_FUNCTION("app.window.create", APP_WINDOW_CREATE)
void SendDelayedResponse();
protected:
virtual ~AppWindowCreateFunction() {}
virtual bool RunImpl() OVERRIDE;
private:
bool GetBoundsSpec(
const extensions::api::app_window::CreateWindowOptions& options,
apps::AppWindow::CreateParams* params,
std::string* error);
apps::AppWindow::Frame GetFrameFromString(const std::string& frame_string);
bool GetFrameOptions(
const extensions::api::app_window::CreateWindowOptions& options,
apps::AppWindow::CreateParams* create_params);
void UpdateFrameOptionsForChannel(
apps::AppWindow::CreateParams* create_params);
bool inject_html_titlebar_;
};
}
#endif