Roll src/third_party/WebKit a3b4a2e:7441784 (svn 202551:202552)
[chromium-blink-merge.git] / extensions / browser / api / app_window / app_window_api.h
blobf70aecb3fba8f961f80edfe746265e068918d097
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_API_APP_WINDOW_APP_WINDOW_API_H_
6 #define EXTENSIONS_BROWSER_API_APP_WINDOW_APP_WINDOW_API_H_
8 #include "extensions/browser/app_window/app_window.h"
9 #include "extensions/browser/extension_function.h"
11 namespace extensions {
13 namespace api {
14 namespace app_window {
15 struct CreateWindowOptions;
19 class AppWindowCreateFunction : public AsyncExtensionFunction {
20 public:
21 AppWindowCreateFunction();
22 DECLARE_EXTENSION_FUNCTION("app.window.create", APP_WINDOW_CREATE)
24 protected:
25 ~AppWindowCreateFunction() override {}
26 bool RunAsync() override;
28 private:
29 bool GetBoundsSpec(
30 const extensions::api::app_window::CreateWindowOptions& options,
31 AppWindow::CreateParams* params,
32 std::string* error);
34 AppWindow::Frame GetFrameFromString(const std::string& frame_string);
35 bool GetFrameOptions(
36 const extensions::api::app_window::CreateWindowOptions& options,
37 AppWindow::CreateParams* create_params);
38 void UpdateFrameOptionsForChannel(AppWindow::CreateParams* create_params);
40 bool inject_html_titlebar_;
43 } // namespace extensions
45 #endif // EXTENSIONS_BROWSER_API_APP_WINDOW_APP_WINDOW_API_H_