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 app window.
22 virtual bool RunWithWindow(apps::AppWindow* window) = 0;
25 virtual bool RunSync() 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::AppWindow* 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::AppWindow* 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::AppWindow* 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::AppWindow* 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::AppWindow* 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::AppWindow* 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::AppWindow* 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::AppWindow* 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::AppWindow* 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::AppWindow* window) OVERRIDE;
137 class AppCurrentWindowInternalSetSizeConstraintsFunction
138 : public AppCurrentWindowInternalExtensionFunction {
140 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setSizeConstraints",
141 APP_CURRENTWINDOWINTERNAL_SETSIZECONSTRAINTS)
143 virtual ~AppCurrentWindowInternalSetSizeConstraintsFunction() {}
144 virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
147 class AppCurrentWindowInternalSetIconFunction
148 : public AppCurrentWindowInternalExtensionFunction {
150 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setIcon",
151 APP_CURRENTWINDOWINTERNAL_SETICON)
154 virtual ~AppCurrentWindowInternalSetIconFunction() {}
155 virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
158 class AppCurrentWindowInternalSetBadgeIconFunction
159 : public AppCurrentWindowInternalExtensionFunction {
161 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setBadgeIcon",
162 APP_CURRENTWINDOWINTERNAL_SETBADGEICON)
165 virtual ~AppCurrentWindowInternalSetBadgeIconFunction() {}
166 virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
169 class AppCurrentWindowInternalClearBadgeFunction
170 : public AppCurrentWindowInternalExtensionFunction {
172 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.clearBadge",
173 APP_CURRENTWINDOWINTERNAL_CLEARBADGE)
176 virtual ~AppCurrentWindowInternalClearBadgeFunction() {}
177 virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
180 class AppCurrentWindowInternalSetShapeFunction
181 : public AppCurrentWindowInternalExtensionFunction {
183 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setShape",
184 APP_CURRENTWINDOWINTERNAL_SETSHAPE)
187 virtual ~AppCurrentWindowInternalSetShapeFunction() {}
188 virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
191 class AppCurrentWindowInternalSetAlwaysOnTopFunction
192 : public AppCurrentWindowInternalExtensionFunction {
194 DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setAlwaysOnTop",
195 APP_CURRENTWINDOWINTERNAL_SETALWAYSONTOP)
198 virtual ~AppCurrentWindowInternalSetAlwaysOnTopFunction() {}
199 virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
202 } // namespace extensions
204 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_INTERNAL_APP_CURRENT_WINDOW_INTERNAL_API_H_