- add sources.
[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 ShellWindow;
12 }
13
14 namespace extensions {
15
16 class AppCurrentWindowInternalExtensionFunction
17     : public ChromeSyncExtensionFunction {
18  protected:
19   virtual ~AppCurrentWindowInternalExtensionFunction() {}
20
21   // Invoked with the current shell window.
22   virtual bool RunWithWindow(apps::ShellWindow* window) = 0;
23
24  private:
25   virtual bool RunImpl() 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::ShellWindow* 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::ShellWindow* 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::ShellWindow* 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::ShellWindow* 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::ShellWindow* 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::ShellWindow* 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::ShellWindow* 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::ShellWindow* 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::ShellWindow* 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::ShellWindow* window) OVERRIDE;
135 };
136
137 class AppCurrentWindowInternalSetMinWidthFunction
138     : public AppCurrentWindowInternalExtensionFunction {
139  public:
140   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMinWidth",
141                              APP_CURRENTWINDOWINTERNAL_SETMINWIDTH)
142  protected:
143   virtual ~AppCurrentWindowInternalSetMinWidthFunction() {}
144   virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
145 };
146
147 class AppCurrentWindowInternalSetMinHeightFunction
148     : public AppCurrentWindowInternalExtensionFunction {
149  public:
150   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMinHeight",
151                              APP_CURRENTWINDOWINTERNAL_SETMINHEIGHT)
152  protected:
153   virtual ~AppCurrentWindowInternalSetMinHeightFunction() {}
154   virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
155 };
156
157 class AppCurrentWindowInternalSetMaxWidthFunction
158     : public AppCurrentWindowInternalExtensionFunction {
159  public:
160   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMaxWidth",
161                              APP_CURRENTWINDOWINTERNAL_SETMAXWIDTH)
162  protected:
163   virtual ~AppCurrentWindowInternalSetMaxWidthFunction() {}
164   virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
165 };
166
167 class AppCurrentWindowInternalSetMaxHeightFunction
168     : public AppCurrentWindowInternalExtensionFunction {
169  public:
170   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setMaxHeight",
171                              APP_CURRENTWINDOWINTERNAL_SETMAXHEIGHT)
172  protected:
173   virtual ~AppCurrentWindowInternalSetMaxHeightFunction() {}
174   virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
175 };
176
177 class AppCurrentWindowInternalSetIconFunction
178     : public AppCurrentWindowInternalExtensionFunction {
179  public:
180   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setIcon",
181                              APP_CURRENTWINDOWINTERNAL_SETICON)
182
183  protected:
184   virtual ~AppCurrentWindowInternalSetIconFunction() {}
185   virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
186 };
187
188 class AppCurrentWindowInternalSetInputRegionFunction
189     : public AppCurrentWindowInternalExtensionFunction {
190  public:
191   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setInputRegion",
192                              APP_CURRENTWINDOWINTERNAL_SETINPUTREGION)
193
194  protected:
195   virtual ~AppCurrentWindowInternalSetInputRegionFunction() {}
196   virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
197 };
198
199 class AppCurrentWindowInternalSetAlwaysOnTopFunction
200     : public AppCurrentWindowInternalExtensionFunction {
201  public:
202   DECLARE_EXTENSION_FUNCTION("app.currentWindowInternal.setAlwaysOnTop",
203                              APP_CURRENTWINDOWINTERNAL_SETALWAYSONTOP)
204
205  protected:
206   virtual ~AppCurrentWindowInternalSetAlwaysOnTopFunction() {}
207   virtual bool RunWithWindow(apps::ShellWindow* window) OVERRIDE;
208 };
209
210 }  // namespace extensions
211
212 #endif  // CHROME_BROWSER_EXTENSIONS_API_APP_CURRENT_WINDOW_INTERNAL_APP_CURRENT_WINDOW_INTERNAL_API_H_