blob: 1dbb1054b1900e8f01b8e853d581a0804fe5eaee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#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 "chrome/browser/extensions/chrome_extension_function.h"
namespace extensions {
namespace api {
namespace app_window {
struct CreateWindowOptions;
}
}
class AppWindowCreateFunction : public ChromeAsyncExtensionFunction {
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_;
};
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_APP_WINDOW_APP_WINDOW_API_H_
|