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 CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_INTERNAL_APP_CURRENT_WINDOW_INTERNAL_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_INTERNAL_APP_CURRENT_WINDOW_INTERNAL_API_H_
8 #include "chrome/browser/extensions/chrome_extension_function.h"
14 namespace extensions {
16 class AppCurrentWindowInternalExtensionFunction
17 : public ChromeSyncExtensionFunction {
19 virtual ~AppCurrentWindowInternalExtensionFunction() {}
21 // Invoked with the current shell window.
22 virtual bool RunWithWindow(apps::ShellWindow* window) = 0;
25 virtual bool RunImpl() OVERRIDE;
28 class AppCurrentWindowInternalFocusFunction
29 : public AppCurrentWindowInternalExtensionFunction {
31 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.focus",
32 APP_CURRENTWINDOWINTERNAL_FOCUS)
35 virtual ~AppCurrentWindowInternalFocusFunction() {}
36 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
39 class AppCurrentWindowInternalFullscreenFunction
40 : public AppCurrentWindowInternalExtensionFunction {
42 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.fullscreen",
43 APP_CURRENTWINDOWINTERNAL_FULLSCREEN)
46 virtual ~AppCurrentWindowInternalFullscreenFunction() {}
47 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
50 class AppCurrentWindowInternalMaximizeFunction
51 : public AppCurrentWindowInternalExtensionFunction {
53 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.maximize",
54 APP_CURRENTWINDOWINTERNAL_MAXIMIZE)
57 virtual ~AppCurrentWindowInternalMaximizeFunction() {}
58 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
61 class AppCurrentWindowInternalMinimizeFunction
62 : public AppCurrentWindowInternalExtensionFunction {
64 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.minimize",
65 APP_CURRENTWINDOWINTERNAL_MINIMIZE)
68 virtual ~AppCurrentWindowInternalMinimizeFunction() {}
69 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
72 class AppCurrentWindowInternalRestoreFunction
73 : public AppCurrentWindowInternalExtensionFunction {
75 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.restore",
76 APP_CURRENTWINDOWINTERNAL_RESTORE)
79 virtual ~AppCurrentWindowInternalRestoreFunction() {}
80 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
83 class AppCurrentWindowInternalDrawAttentionFunction
84 : public AppCurrentWindowInternalExtensionFunction {
86 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.drawAttention",
87 APP_CURRENTWINDOWINTERNAL_DRAWATTENTION)
90 virtual ~AppCurrentWindowInternalDrawAttentionFunction() {}
91 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
94 class AppCurrentWindowInternalClearAttentionFunction
95 : public AppCurrentWindowInternalExtensionFunction {
97 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.clearAttention",
98 APP_CURRENTWINDOWINTERNAL_CLEARATTENTION)
101 virtual ~AppCurrentWindowInternalClearAttentionFunction() {}
102 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
105 class AppCurrentWindowInternalShowFunction
106 : public AppCurrentWindowInternalExtensionFunction {
108 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.show",
109 APP_CURRENTWINDOWINTERNAL_SHOW)
112 virtual ~AppCurrentWindowInternalShowFunction() {}
113 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
116 class AppCurrentWindowInternalHideFunction
117 : public AppCurrentWindowInternalExtensionFunction {
119 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.hide",
120 APP_CURRENTWINDOWINTERNAL_HIDE)
123 virtual ~AppCurrentWindowInternalHideFunction() {}
124 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
127 class AppCurrentWindowInternalSetBoundsFunction
128 : public AppCurrentWindowInternalExtensionFunction {
130 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setBounds",
131 APP_CURRENTWINDOWINTERNAL_SETBOUNDS)
133 virtual ~AppCurrentWindowInternalSetBoundsFunction() {}
134 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
137 class AppCurrentWindowInternalSetMinWidthFunction
138 : public AppCurrentWindowInternalExtensionFunction {
140 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMinWidth",
141 APP_CURRENTWINDOWINTERNAL_SETMINWIDTH)
143 virtual ~AppCurrentWindowInternalSetMinWidthFunction() {}
144 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
147 class AppCurrentWindowInternalSetMinHeightFunction
148 : public AppCurrentWindowInternalExtensionFunction {
150 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMinHeight",
151 APP_CURRENTWINDOWINTERNAL_SETMINHEIGHT)
153 virtual ~AppCurrentWindowInternalSetMinHeightFunction() {}
154 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
157 class AppCurrentWindowInternalSetMaxWidthFunction
158 : public AppCurrentWindowInternalExtensionFunction {
160 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMaxWidth",
161 APP_CURRENTWINDOWINTERNAL_SETMAXWIDTH)
163 virtual ~AppCurrentWindowInternalSetMaxWidthFunction() {}
164 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
167 class AppCurrentWindowInternalSetMaxHeightFunction
168 : public AppCurrentWindowInternalExtensionFunction {
170 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMaxHeight",
171 APP_CURRENTWINDOWINTERNAL_SETMAXHEIGHT)
173 virtual ~AppCurrentWindowInternalSetMaxHeightFunction() {}
174 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
177 class AppCurrentWindowInternalSetIconFunction
178 : public AppCurrentWindowInternalExtensionFunction {
180 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setIcon",
181 APP_CURRENTWINDOWINTERNAL_SETICON)
184 virtual ~AppCurrentWindowInternalSetIconFunction() {}
185 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
188 class AppCurrentWindowInternalSetInputRegionFunction
189 : public AppCurrentWindowInternalExtensionFunction {
191 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setInputRegion",
192 APP_CURRENTWINDOWINTERNAL_SETINPUTREGION)
195 virtual ~AppCurrentWindowInternalSetInputRegionFunction() {}
196 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
199 class AppCurrentWindowInternalSetAlwaysOnTopFunction
200 : public AppCurrentWindowInternalExtensionFunction {
202 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setAlwaysOnTop",
203 APP_CURRENTWINDOWINTERNAL_SETALWAYSONTOP)
206 virtual ~AppCurrentWindowInternalSetAlwaysOnTopFunction() {}
207 virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
210 } // namespace extensions
212 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_INTERNAL_APP_CURRENT_WINDOW_INTERNAL_API_H_