Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: generated_files_will_not_submit/windows.h

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 // GENERATED FROM THE API DEFINITION IN
6 // chrome/common/extensions/api/windows.json
7 // DO NOT EDIT.
8
9 #ifndef CHROME_COMMON_EXTENSIONS_API_WINDOWS_H__
10 #define CHROME_COMMON_EXTENSIONS_API_WINDOWS_H__
11 #pragma once
12
13 #include <string>
14 #include <vector>
15
16 #include "base/basictypes.h"
17 #include "base/memory/linked_ptr.h"
18 #include "base/memory/scoped_ptr.h"
19 #include "base/values.h"
20
21 using base::Value;
22 using base::DictionaryValue;
23 using base::ListValue;
24
25 namespace extensions {
26 namespace api {
27
28 namespace tabs {
29 struct Tab;
30 }
31
32 namespace windows {
33
34 //
35 // Types
36 //
37
38 struct Window {
39 ~Window();
40 Window();
41
42 // Array of $ref:Tab objects representing the current tabs in the window.
43 scoped_ptr<std::vector<linked_ptr<tabs::Tab> > > tabs;
44
45 // The offset of the window from the top edge of the screen in pixels.
46 int top;
47
48 // The height of the window in pixels.
49 int height;
50
51 // The width of the window in pixels.
52 int width;
53
54 // The state of this browser window.
55 std::string state;
56
57 // Whether the window is currently the focused window.
58 bool focused;
59
60 // The offset of the window from the left edge of the screen in pixels.
61 int left;
62
63 // The type of browser window this is.
64 std::string type;
65
66 // The ID of the window. Window IDs are unique within a browser session.
67 int id;
68
69 // Whether the window is incognito.
70 bool incognito;
71
72 // Populates a Window object from a Value. Returns whether |out| was
73 // successfully populated.
74 static bool Populate(const Value& value, Window* out);
75
76 // Returns a new DictionaryValue representing the serialized form of this
77 // Window object. Passesownership to caller.
78 DictionaryValue* ToValue() const;
79
80 private:
81 DISALLOW_COPY_AND_ASSIGN(Window);
82 };
83
84 //
85 // Functions
86 //
87
88 namespace Get {
89 struct Params {
90 struct GetInfo {
91 ~GetInfo();
92 GetInfo();
93
94 // If true, the window object will have a <var>tabs</var> property that
95 // contains a list of the $ref:Tab objects
96 scoped_ptr<bool> populate;
97
98 // Populates a GetInfo object from a Value. Returns whether |out| was
99 // successfully populated.
100 static bool Populate(const Value& value, GetInfo* out);
101
102
103 private:
104 DISALLOW_COPY_AND_ASSIGN(GetInfo);
105 };
106
107 int window_id;
108 scoped_ptr<GetInfo> get_info;
109
110 ~Params();
111
112 static scoped_ptr<Params> Create(const ListValue& args);
113
114 private:
115 Params();
116
117 DISALLOW_COPY_AND_ASSIGN(Params);
118 };
119
120 class Result {
121 public:
122 static Value* Create(const Window& window);
123
124 private:
125 Result() {};
126 DISALLOW_COPY_AND_ASSIGN(Result);
127 };
128
129 };
130
131 namespace GetCurrent {
132 struct Params {
133 struct GetInfo {
134 ~GetInfo();
135 GetInfo();
136
137 // If true, the window object will have a <var>tabs</var> property that
138 // contains a list of the $ref:Tab objects
139 scoped_ptr<bool> populate;
140
141 // Populates a GetInfo object from a Value. Returns whether |out| was
142 // successfully populated.
143 static bool Populate(const Value& value, GetInfo* out);
144
145
146 private:
147 DISALLOW_COPY_AND_ASSIGN(GetInfo);
148 };
149
150 scoped_ptr<GetInfo> get_info;
151
152 ~Params();
153
154 static scoped_ptr<Params> Create(const ListValue& args);
155
156 private:
157 Params();
158
159 DISALLOW_COPY_AND_ASSIGN(Params);
160 };
161
162 class Result {
163 public:
164 static Value* Create(const Window& window);
165
166 private:
167 Result() {};
168 DISALLOW_COPY_AND_ASSIGN(Result);
169 };
170
171 };
172
173 namespace GetAll {
174 struct Params {
175 struct GetInfo {
176 ~GetInfo();
177 GetInfo();
178
179 // If true, each window object will have a <var>tabs</var> property that
180 // contains a list of the $ref:Tab objects for that window.
181 scoped_ptr<bool> populate;
182
183 // Populates a GetInfo object from a Value. Returns whether |out| was
184 // successfully populated.
185 static bool Populate(const Value& value, GetInfo* out);
186
187
188 private:
189 DISALLOW_COPY_AND_ASSIGN(GetInfo);
190 };
191
192 scoped_ptr<GetInfo> get_info;
193
194 ~Params();
195
196 static scoped_ptr<Params> Create(const ListValue& args);
197
198 private:
199 Params();
200
201 DISALLOW_COPY_AND_ASSIGN(Params);
202 };
203
204 class Result {
205 public:
206 static Value* Create(const std::vector<linked_ptr<Window> > windows);
207
208 private:
209 Result() {};
210 DISALLOW_COPY_AND_ASSIGN(Result);
211 };
212
213 };
214
215 namespace Update {
216 struct Params {
217 struct UpdateInfo {
218 ~UpdateInfo();
219 UpdateInfo();
220
221 // The offset from the top edge of the screen to move the window to in
222 // pixels. This value is ignored for panels.
223 scoped_ptr<int> top;
224
225 // If true, causes the window to be displayed in a manner that draws the
226 // user's attention to the window, without changing the focused window. Th e
227 // effect lasts until the user changes focus to the window. This option ha s
228 // no effect if the window already has focus. Set to false to cancel a
229 // previous draw attention request.
230 scoped_ptr<bool> draw_attention;
231
232 // The height to resize the window to in pixels. This value is ignored for
233 // panels.
234 scoped_ptr<int> height;
235
236 // The width to resize the window to in pixels. This value is ignored for
237 // panels.
238 scoped_ptr<int> width;
239
240 // The new state of the window. The 'minimized' and 'maximized' states can not
241 // be combined with 'left', 'top', 'width' or 'height'.
242 scoped_ptr<std::string> state;
243
244 // If true, brings the window to the front. If false, brings the next wind ow
245 // in the z-order to the front.
246 scoped_ptr<bool> focused;
247
248 // The offset from the left edge of the screen to move the window to in
249 // pixels. This value is ignored for panels.
250 scoped_ptr<int> left;
251
252 // Populates a UpdateInfo object from a Value. Returns whether |out| was
253 // successfully populated.
254 static bool Populate(const Value& value, UpdateInfo* out);
255
256
257 private:
258 DISALLOW_COPY_AND_ASSIGN(UpdateInfo);
259 };
260
261 int window_id;
262 UpdateInfo update_info;
263
264 ~Params();
265
266 static scoped_ptr<Params> Create(const ListValue& args);
267
268 private:
269 Params();
270
271 DISALLOW_COPY_AND_ASSIGN(Params);
272 };
273
274 class Result {
275 public:
276 static Value* Create(const Window& window);
277
278 private:
279 Result() {};
280 DISALLOW_COPY_AND_ASSIGN(Result);
281 };
282
283 };
284
285 namespace Remove {
286 struct Params {
287 int window_id;
288
289 ~Params();
290
291 static scoped_ptr<Params> Create(const ListValue& args);
292
293 private:
294 Params();
295
296 DISALLOW_COPY_AND_ASSIGN(Params);
297 };
298
299 class Result {
300 public:
301 static Value* Create();
302
303 private:
304 Result() {};
305 DISALLOW_COPY_AND_ASSIGN(Result);
306 };
307
308 };
309
310 namespace GetLastFocused {
311 struct Params {
312 struct GetInfo {
313 ~GetInfo();
314 GetInfo();
315
316 // If true, the window object will have a <var>tabs</var> property that
317 // contains a list of the $ref:Tab objects
318 scoped_ptr<bool> populate;
319
320 // Populates a GetInfo object from a Value. Returns whether |out| was
321 // successfully populated.
322 static bool Populate(const Value& value, GetInfo* out);
323
324
325 private:
326 DISALLOW_COPY_AND_ASSIGN(GetInfo);
327 };
328
329 scoped_ptr<GetInfo> get_info;
330
331 ~Params();
332
333 static scoped_ptr<Params> Create(const ListValue& args);
334
335 private:
336 Params();
337
338 DISALLOW_COPY_AND_ASSIGN(Params);
339 };
340
341 class Result {
342 public:
343 static Value* Create(const Window& window);
344
345 private:
346 Result() {};
347 DISALLOW_COPY_AND_ASSIGN(Result);
348 };
349
350 };
351
352
353 } // windows
354 } // api
355 } // extensions
356
357 #endif // CHROME_COMMON_EXTENSIONS_API_WINDOWS_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698