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

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: a few comments, fixes 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 Create {
174 struct Params {
175 struct CreateData {
176 ~CreateData();
177 CreateData();
178
179 // The id of the tab for which you want to adopt to the new window.
180 scoped_ptr<int> tab_id;
181
182 std::vector<std::string> create_data_array;
183
184 // The number of pixels to position the new window from the top edge of th e
185 // screen. If not specified, the new window is offset naturally from the l ast
186 // focusd window. This value is ignored for panels.
187 scoped_ptr<int> top;
188
189 // The height in pixels of the new window. If not specified defaults to a
190 // natural height.
191 scoped_ptr<int> height;
192
193 // The width in pixels of the new window. If not specified defaults to a
194 // natural width.
195 scoped_ptr<int> width;
196
197 // If true, opens an active window. If false, opens an inactive window.
198 scoped_ptr<bool> focused;
199
200 // The number of pixels to position the new window from the left edge of t he
201 // screen. If not specified, the new window is offset naturally from the l ast
202 // focusd window. This value is ignored for panels.
203 scoped_ptr<int> left;
204
205 // Specifies what type of browser window to create. The 'panel' type creat es
206 // a popup unless the '--enable-panels' flag is set.
207 scoped_ptr<std::string> type;
208
209 // Whether the new window should be an incognito window.
210 scoped_ptr<bool> incognito;
211
212 // Populates a CreateData object from a Value. Returns whether |out| was
213 // successfully populated.
214 static bool Populate(const Value& value, CreateData* out);
215
216
217 private:
218 DISALLOW_COPY_AND_ASSIGN(CreateData);
219 };
220
221 scoped_ptr<CreateData> create_data;
222
223 ~Params();
224
225 static scoped_ptr<Params> Create(const ListValue& args);
226
227 private:
228 Params();
229
230 DISALLOW_COPY_AND_ASSIGN(Params);
231 };
232
233 class Result {
234 public:
235 // Contains details about the created window.
236 static Value* Create(const Window& window);
237
238 private:
239 Result() {};
240 DISALLOW_COPY_AND_ASSIGN(Result);
241 };
242
243 };
244
245 namespace GetAll {
246 struct Params {
247 struct GetInfo {
248 ~GetInfo();
249 GetInfo();
250
251 // If true, each window object will have a <var>tabs</var> property that
252 // contains a list of the $ref:Tab objects for that window.
253 scoped_ptr<bool> populate;
254
255 // Populates a GetInfo object from a Value. Returns whether |out| was
256 // successfully populated.
257 static bool Populate(const Value& value, GetInfo* out);
258
259
260 private:
261 DISALLOW_COPY_AND_ASSIGN(GetInfo);
262 };
263
264 scoped_ptr<GetInfo> get_info;
265
266 ~Params();
267
268 static scoped_ptr<Params> Create(const ListValue& args);
269
270 private:
271 Params();
272
273 DISALLOW_COPY_AND_ASSIGN(Params);
274 };
275
276 class Result {
277 public:
278 static Value* Create(const std::vector<linked_ptr<Window> > windows);
279
280 private:
281 Result() {};
282 DISALLOW_COPY_AND_ASSIGN(Result);
283 };
284
285 };
286
287 namespace Update {
288 struct Params {
289 struct UpdateInfo {
290 ~UpdateInfo();
291 UpdateInfo();
292
293 // The offset from the top edge of the screen to move the window to in
294 // pixels. This value is ignored for panels.
295 scoped_ptr<int> top;
296
297 // If true, causes the window to be displayed in a manner that draws the
298 // user's attention to the window, without changing the focused window. Th e
299 // effect lasts until the user changes focus to the window. This option ha s
300 // no effect if the window already has focus. Set to false to cancel a
301 // previous draw attention request.
302 scoped_ptr<bool> draw_attention;
303
304 // The height to resize the window to in pixels. This value is ignored for
305 // panels.
306 scoped_ptr<int> height;
307
308 // The width to resize the window to in pixels. This value is ignored for
309 // panels.
310 scoped_ptr<int> width;
311
312 // The new state of the window. The 'minimized' and 'maximized' states can not
313 // be combined with 'left', 'top', 'width' or 'height'.
314 scoped_ptr<std::string> state;
315
316 // If true, brings the window to the front. If false, brings the next wind ow
317 // in the z-order to the front.
318 scoped_ptr<bool> focused;
319
320 // The offset from the left edge of the screen to move the window to in
321 // pixels. This value is ignored for panels.
322 scoped_ptr<int> left;
323
324 // Populates a UpdateInfo object from a Value. Returns whether |out| was
325 // successfully populated.
326 static bool Populate(const Value& value, UpdateInfo* out);
327
328
329 private:
330 DISALLOW_COPY_AND_ASSIGN(UpdateInfo);
331 };
332
333 int window_id;
334 UpdateInfo update_info;
335
336 ~Params();
337
338 static scoped_ptr<Params> Create(const ListValue& args);
339
340 private:
341 Params();
342
343 DISALLOW_COPY_AND_ASSIGN(Params);
344 };
345
346 class Result {
347 public:
348 static Value* Create(const Window& window);
349
350 private:
351 Result() {};
352 DISALLOW_COPY_AND_ASSIGN(Result);
353 };
354
355 };
356
357 namespace Remove {
358 struct Params {
359 int window_id;
360
361 ~Params();
362
363 static scoped_ptr<Params> Create(const ListValue& args);
364
365 private:
366 Params();
367
368 DISALLOW_COPY_AND_ASSIGN(Params);
369 };
370
371 class Result {
372 public:
373 static Value* Create();
374
375 private:
376 Result() {};
377 DISALLOW_COPY_AND_ASSIGN(Result);
378 };
379
380 };
381
382 namespace GetLastFocused {
383 struct Params {
384 struct GetInfo {
385 ~GetInfo();
386 GetInfo();
387
388 // If true, the window object will have a <var>tabs</var> property that
389 // contains a list of the $ref:Tab objects
390 scoped_ptr<bool> populate;
391
392 // Populates a GetInfo object from a Value. Returns whether |out| was
393 // successfully populated.
394 static bool Populate(const Value& value, GetInfo* out);
395
396
397 private:
398 DISALLOW_COPY_AND_ASSIGN(GetInfo);
399 };
400
401 scoped_ptr<GetInfo> get_info;
402
403 ~Params();
404
405 static scoped_ptr<Params> Create(const ListValue& args);
406
407 private:
408 Params();
409
410 DISALLOW_COPY_AND_ASSIGN(Params);
411 };
412
413 class Result {
414 public:
415 static Value* Create(const Window& window);
416
417 private:
418 Result() {};
419 DISALLOW_COPY_AND_ASSIGN(Result);
420 };
421
422 };
423
424
425 } // windows
426 } // api
427 } // extensions
428
429 #endif // CHROME_COMMON_EXTENSIONS_API_WINDOWS_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698