Upstream version 10.38.222.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / app_current_window_internal / app_current_window_internal_api.h
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.
4
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_
7
8 #include "chrome/browser/extensions/chrome_extension_function.h"
9
10 namespace apps {
11 class AppWindow;
12 }
13
14 namespace extensions {
15
16 class AppCurrentWindowInternalExtensionFunction
17     : public ChromeSyncExtensionFunction {
18  protected:
19   virtual ~AppCurrentWindowInternalExtensionFunction() {}
20
21   // Invoked with the current app window.
22   virtual bool RunWithWindow(apps::AppWindow* window) = 0;
23
24  private:
25   virtual bool RunSync() OVERRIDE;
26 };
27
28 class AppCurrentWindowInternalFocusFunction
29     : public AppCurrentWindowInternalExtensionFunction {
30  public:
31   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.focus",
32                              APP_CURRENTWINDOWINTERNAL_FOCUS)
33
34  protected:
35   virtual ~AppCurrentWindowInternalFocusFunction() {}
36   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
37 };
38
39 class AppCurrentWindowInternalFullscreenFunction
40     : public AppCurrentWindowInternalExtensionFunction {
41  public:
42   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.fullscreen",
43                              APP_CURRENTWINDOWINTERNAL_FULLSCREEN)
44
45  protected:
46   virtual ~AppCurrentWindowInternalFullscreenFunction() {}
47   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
48 };
49
50 class AppCurrentWindowInternalMaximizeFunction
51     : public AppCurrentWindowInternalExtensionFunction {
52  public:
53   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.maximize",
54                              APP_CURRENTWINDOWINTERNAL_MAXIMIZE)
55
56  protected:
57   virtual ~AppCurrentWindowInternalMaximizeFunction() {}
58   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
59 };
60
61 class AppCurrentWindowInternalMinimizeFunction
62     : public AppCurrentWindowInternalExtensionFunction {
63  public:
64   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.minimize",
65                              APP_CURRENTWINDOWINTERNAL_MINIMIZE)
66
67  protected:
68   virtual ~AppCurrentWindowInternalMinimizeFunction() {}
69   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
70 };
71
72 class AppCurrentWindowInternalRestoreFunction
73     : public AppCurrentWindowInternalExtensionFunction {
74  public:
75   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.restore",
76                              APP_CURRENTWINDOWINTERNAL_RESTORE)
77
78  protected:
79   virtual ~AppCurrentWindowInternalRestoreFunction() {}
80   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
81 };
82
83 class AppCurrentWindowInternalDrawAttentionFunction
84     : public AppCurrentWindowInternalExtensionFunction {
85  public:
86   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.drawAttention",
87                              APP_CURRENTWINDOWINTERNAL_DRAWATTENTION)
88
89  protected:
90   virtual ~AppCurrentWindowInternalDrawAttentionFunction() {}
91   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
92 };
93
94 class AppCurrentWindowInternalClearAttentionFunction
95     : public AppCurrentWindowInternalExtensionFunction {
96  public:
97   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.clearAttention",
98                              APP_CURRENTWINDOWINTERNAL_CLEARATTENTION)
99
100  protected:
101   virtual ~AppCurrentWindowInternalClearAttentionFunction() {}
102   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
103 };
104
105 class AppCurrentWindowInternalShowFunction
106     : public AppCurrentWindowInternalExtensionFunction {
107  public:
108   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.show",
109                              APP_CURRENTWINDOWINTERNAL_SHOW)
110
111  protected:
112   virtual ~AppCurrentWindowInternalShowFunction() {}
113   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
114 };
115
116 class AppCurrentWindowInternalHideFunction
117     : public AppCurrentWindowInternalExtensionFunction {
118  public:
119   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.hide",
120                              APP_CURRENTWINDOWINTERNAL_HIDE)
121
122  protected:
123   virtual ~AppCurrentWindowInternalHideFunction() {}
124   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
125 };
126
127 class AppCurrentWindowInternalSetBoundsFunction
128     : public AppCurrentWindowInternalExtensionFunction {
129  public:
130   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setBounds",
131                              APP_CURRENTWINDOWINTERNAL_SETBOUNDS)
132  protected:
133   virtual ~AppCurrentWindowInternalSetBoundsFunction() {}
134   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
135 };
136
137 class AppCurrentWindowInternalSetSizeConstraintsFunction
138     : public AppCurrentWindowInternalExtensionFunction {
139  public:
140   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setSizeConstraints",
141                              APP_CURRENTWINDOWINTERNAL_SETSIZECONSTRAINTS)
142  protected:
143   virtual ~AppCurrentWindowInternalSetSizeConstraintsFunction() {}
144   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
145 };
146
147 class AppCurrentWindowInternalSetIconFunction
148     : public AppCurrentWindowInternalExtensionFunction {
149  public:
150   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setIcon",
151                              APP_CURRENTWINDOWINTERNAL_SETICON)
152
153  protected:
154   virtual ~AppCurrentWindowInternalSetIconFunction() {}
155   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
156 };
157
158 class AppCurrentWindowInternalSetBadgeIconFunction
159     : public AppCurrentWindowInternalExtensionFunction {
160  public:
161   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setBadgeIcon",
162                              APP_CURRENTWINDOWINTERNAL_SETBADGEICON)
163
164  protected:
165   virtual ~AppCurrentWindowInternalSetBadgeIconFunction() {}
166   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
167 };
168
169 class AppCurrentWindowInternalClearBadgeFunction
170     : public AppCurrentWindowInternalExtensionFunction {
171  public:
172   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.clearBadge",
173                              APP_CURRENTWINDOWINTERNAL_CLEARBADGE)
174
175  protected:
176   virtual ~AppCurrentWindowInternalClearBadgeFunction() {}
177   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
178 };
179
180 class AppCurrentWindowInternalSetShapeFunction
181     : public AppCurrentWindowInternalExtensionFunction {
182  public:
183   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setShape",
184                              APP_CURRENTWINDOWINTERNAL_SETSHAPE)
185
186  protected:
187   virtual ~AppCurrentWindowInternalSetShapeFunction() {}
188   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
189 };
190
191 class AppCurrentWindowInternalSetAlwaysOnTopFunction
192     : public AppCurrentWindowInternalExtensionFunction {
193  public:
194   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setAlwaysOnTop",
195                              APP_CURRENTWINDOWINTERNAL_SETALWAYSONTOP)
196
197  protected:
198   virtual ~AppCurrentWindowInternalSetAlwaysOnTopFunction() {}
199   virtual bool RunWithWindow(apps::AppWindow* window) OVERRIDE;
200 };
201
202 }  // namespace extensions
203
204 #endif  // CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_INTERNAL_APP_CURRENT_WINDOW_INTERNAL_API_H_