OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "webViewInternal", | 7 "namespace": "chromeWebViewInternal", |
8 "description": "none", | 8 "description": "none", |
9 "compiler_options": { | 9 "compiler_options": { |
10 "implemented_in": "chrome/browser/extensions/api/web_view/web_view_interna
l_api.h" | 10 "implemented_in": "chrome/browser/extensions/api/web_view/chrome_web_view_
internal_api.h" |
11 }, | 11 }, |
12 "dependencies": ["contextMenusInternal"], | 12 "dependencies": ["contextMenusInternal"], |
13 "types": [ | 13 "types": [ |
14 { | 14 { |
15 "id": "DataTypeSet", | 15 "id": "DataTypeSet", |
16 "type": "object", | 16 "type": "object", |
17 "description": "A set of data types. Missing data types are interpreted
as <code>false</code>.", | 17 "description": "A set of data types. Missing data types are interpreted
as <code>false</code>.", |
18 "properties": { | 18 "properties": { |
19 "appcache": { | 19 "appcache": { |
20 "type": "boolean", | 20 "type": "boolean", |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 { | 329 { |
330 "name": "callback", | 330 "name": "callback", |
331 "type": "function", | 331 "type": "function", |
332 "description": "Called when deletion has completed.", | 332 "description": "Called when deletion has completed.", |
333 "optional": true, | 333 "optional": true, |
334 "parameters": [] | 334 "parameters": [] |
335 } | 335 } |
336 ] | 336 ] |
337 }, | 337 }, |
338 { | 338 { |
339 "name": "executeScript", | |
340 "type": "function", | |
341 "description": "Injects JavaScript code into a <webview> page.", | |
342 "parameters": [ | |
343 { | |
344 "type": "integer", | |
345 "name": "instanceId", | |
346 "description": "The instance ID of the guest <webview> process." | |
347 }, | |
348 { | |
349 "type": "string", | |
350 "name": "src", | |
351 "description": "The src of the guest <webview> tag." | |
352 }, | |
353 { | |
354 "$ref": "extensionTypes.InjectDetails", | |
355 "name": "details", | |
356 "description": "Details of the script to run." | |
357 }, | |
358 { | |
359 "type": "function", | |
360 "name": "callback", | |
361 "optional": true, | |
362 "description": "Called after all the JavaScript has been executed.", | |
363 "parameters": [ | |
364 { | |
365 "name": "result", | |
366 "optional": true, | |
367 "type": "array", | |
368 "items": {"type": "any", "minimum": 0}, | |
369 "description": "The result of the script in every injected frame
." | |
370 } | |
371 ] | |
372 } | |
373 ] | |
374 }, | |
375 { | |
376 "name": "insertCSS", | |
377 "type": "function", | |
378 "description": "Injects CSS into a <webview> page. For details, see the
<a href='/extensions/content_scripts#pi'>programmatic injection</a> section of t
he content scripts doc.", | |
379 "parameters": [ | |
380 { | |
381 "type": "integer", | |
382 "name": "instanceId", | |
383 "description": "The instance ID of the guest <webview> process." | |
384 }, | |
385 { | |
386 "type": "string", | |
387 "name": "src", | |
388 "description": "The src of the guest <webview> tag." | |
389 }, | |
390 { | |
391 "$ref": "extensionTypes.InjectDetails", | |
392 "name": "details", | |
393 "description": "Details of the CSS text to insert." | |
394 }, | |
395 { | |
396 "type": "function", | |
397 "name": "callback", | |
398 "optional": true, | |
399 "description": "Called when all the CSS has been inserted.", | |
400 "parameters": [] | |
401 } | |
402 ] | |
403 }, | |
404 { | |
405 "name": "captureVisibleRegion", | |
406 "type": "function", | |
407 "description": "Captures the visible area of the currently loaded page i
nside <webview>.", | |
408 "parameters": [ | |
409 { | |
410 "type": "integer", | |
411 "name": "instanceId", | |
412 "description": "The instance ID of the guest <webview> process." | |
413 }, | |
414 { | |
415 "$ref": "extensionTypes.ImageDetails", | |
416 "name": "options", | |
417 "optional": true | |
418 }, | |
419 { | |
420 "type": "function", "name": "callback", "parameters": [ | |
421 {"type": "string", "name": "dataUrl", "description": "A data URL w
hich encodes an image of the visible area of the captured tab. May be assigned t
o the 'src' property of an HTML Image element for display."} | |
422 ] | |
423 } | |
424 ] | |
425 }, | |
426 { | |
427 "name": "setZoom", | |
428 "type": "function", | |
429 "parameters": [ | |
430 { | |
431 "type": "integer", | |
432 "name": "instanceId", | |
433 "description": "The instance ID of the guest <webview> process." | |
434 }, | |
435 { | |
436 "type": "number", | |
437 "name": "zoomFactor", | |
438 "description" : "The new zoom factor." | |
439 }, | |
440 { | |
441 "type": "function", | |
442 "name": "callback", | |
443 "description": "Called after the zoom message has been sent to the g
uest process.", | |
444 "optional": true, | |
445 "parameters": [] | |
446 } | |
447 ] | |
448 }, | |
449 { | |
450 "name": "getZoom", | |
451 "type": "function", | |
452 "parameters": [ | |
453 { | |
454 "type": "integer", | |
455 "name": "instanceId", | |
456 "description": "The instance ID of the guest <webview> process." | |
457 }, | |
458 { | |
459 "type": "function", | |
460 "name": "callback", | |
461 "description": "Called after the current zoom factor is retreived.", | |
462 "parameters": [ | |
463 { | |
464 "type": "number", | |
465 "name": "zoomFactor", | |
466 "description": "The current zoom factor." | |
467 } | |
468 ] | |
469 } | |
470 ] | |
471 }, | |
472 { | |
473 "name": "find", | |
474 "type": "function", | |
475 "description": "Initiates a find-in-page request.", | |
476 "parameters": [ | |
477 { | |
478 "type": "integer", | |
479 "name": "instanceId", | |
480 "description": "The instance ID of the guest <webview> process." | |
481 }, | |
482 { | |
483 "type": "string", | |
484 "name": "searchText", | |
485 "description": "The string to find in the page." | |
486 }, | |
487 { | |
488 "type": "object", | |
489 "name": "options", | |
490 "optional": true, | |
491 "properties": { | |
492 "backward": { | |
493 "type": "boolean", | |
494 "description": "Flag to find matches in reverse order.", | |
495 "optional": true | |
496 }, | |
497 "matchCase": { | |
498 "type": "boolean", | |
499 "description": "Flag to match |searchText| with case-sensitivity
.", | |
500 "optional": true | |
501 } | |
502 } | |
503 }, | |
504 { | |
505 "type": "function", | |
506 "name": "callback", | |
507 "description": "Called after all find results have been returned for
this find request.", | |
508 "optional": true, | |
509 "parameters": [ | |
510 { | |
511 "type": "object", | |
512 "name": "results", | |
513 "optional": true, | |
514 "properties": { | |
515 "numberOfMatches": { | |
516 "type": "integer", | |
517 "description": "The number of times |searchText| was matched
on the page." | |
518 }, | |
519 "activeMatchOrdinal": { | |
520 "type": "integer", | |
521 "description": "The ordinal number of the current match." | |
522 }, | |
523 "selectionRect": { | |
524 "type": "object", | |
525 "description": "Describes a rectangle around the active matc
h.", | |
526 "properties": { | |
527 "left": { | |
528 "type": "integer" | |
529 }, | |
530 "top": { | |
531 "type": "integer" | |
532 }, | |
533 "width": { | |
534 "type": "integer" | |
535 }, | |
536 "height": { | |
537 "type": "integer" | |
538 } | |
539 } | |
540 }, | |
541 "canceled": { | |
542 "type": "boolean", | |
543 "description": "Indicates whether this find request was canc
eled." | |
544 } | |
545 } | |
546 } | |
547 ] | |
548 } | |
549 ] | |
550 }, | |
551 { | |
552 "name": "stopFinding", | |
553 "type": "function", | |
554 "description": "Ends the current find session (clearing all highlighting
) and cancels all find requests in progress.", | |
555 "parameters": [ | |
556 { | |
557 "type": "integer", | |
558 "name": "instanceId", | |
559 "description": "The instance ID of the guest <webview> process." | |
560 }, | |
561 { | |
562 "type": "string", | |
563 "name": "action", | |
564 "description": "Determines what to do with the active match after th
e find session has ended. 'clear' will clear the highlighting over the active ma
tch; 'keep' will keep the active match highlighted; 'activate' will keep the act
ive match highlighted and simulate a user click on that match.", | |
565 "optional": true, | |
566 "enum": ["clear", "keep", "activate"] | |
567 } | |
568 ] | |
569 }, | |
570 { | |
571 "name": "go", | |
572 "type": "function", | |
573 "parameters": [ | |
574 { | |
575 "type": "integer", | |
576 "name": "instanceId" | |
577 }, | |
578 { | |
579 "type": "integer", | |
580 "name": "relativeIndex" | |
581 } | |
582 ] | |
583 }, | |
584 { | |
585 "name": "overrideUserAgent", | |
586 "type": "function", | |
587 "parameters": [ | |
588 { | |
589 "type": "integer", | |
590 "name": "instanceId" | |
591 }, | |
592 { | |
593 "type": "string", | |
594 "name": "userAgentOverride" | |
595 } | |
596 ] | |
597 }, | |
598 { | |
599 "name": "reload", | |
600 "type": "function", | |
601 "parameters": [ | |
602 { | |
603 "type": "integer", | |
604 "name": "instanceId" | |
605 } | |
606 ] | |
607 }, | |
608 { | |
609 "name": "setName", | |
610 "type": "function", | |
611 "parameters": [ | |
612 { | |
613 "type": "integer", | |
614 "name": "instanceId" | |
615 }, | |
616 { | |
617 "type": "string", | |
618 "name": "frameName" | |
619 } | |
620 ] | |
621 }, | |
622 { | |
623 "name": "setPermission", | |
624 "type": "function", | |
625 "parameters": [ | |
626 { | |
627 "type": "integer", | |
628 "name": "instanceId" | |
629 }, | |
630 { | |
631 "type": "integer", | |
632 "name": "requestId" | |
633 }, | |
634 { | |
635 "type": "string", | |
636 "name": "action", | |
637 "enum": ["allow", "deny", "default"] | |
638 }, | |
639 { | |
640 "type": "string", | |
641 "name": "userInput", | |
642 "optional": true | |
643 }, | |
644 { | |
645 "type": "function", | |
646 "name": "callback", | |
647 "optional": true, | |
648 "parameters": [ | |
649 { | |
650 "name": "allowed", | |
651 "type": "boolean" | |
652 } | |
653 ] | |
654 } | |
655 ] | |
656 }, | |
657 { | |
658 "name": "navigate", | |
659 "type": "function", | |
660 "parameters": [ | |
661 { | |
662 "type": "integer", | |
663 "name": "instanceId" | |
664 }, | |
665 { | |
666 "type": "string", | |
667 "name": "src" | |
668 } | |
669 ] | |
670 }, | |
671 { | |
672 "name": "showContextMenu", | 339 "name": "showContextMenu", |
673 "type": "function", | 340 "type": "function", |
674 "parameters": [ | 341 "parameters": [ |
675 { | 342 { |
676 "type": "integer", | 343 "type": "integer", |
677 "name": "instanceId", | 344 "name": "instanceId", |
678 "description": "The instance ID of the guest <webview> process
. This not exposed to developers through the API." | 345 "description": "The instance ID of the guest <webview> process
. This not exposed to developers through the API." |
679 }, | 346 }, |
680 { | 347 { |
681 "type": "integer", | 348 "type": "integer", |
682 "name": "requestId", | 349 "name": "requestId", |
683 "description": "The strictly increasing request counter that serves
as ID for the context menu. This not exposed to developers through the API." | 350 "description": "The strictly increasing request counter that serves
as ID for the context menu. This not exposed to developers through the API." |
684 }, | 351 }, |
685 { | 352 { |
686 "type": "array", | 353 "type": "array", |
687 "name": "itemsToShow", | 354 "name": "itemsToShow", |
688 "items": {"$ref": "ContextMenuItem"}, | 355 "items": {"$ref": "ContextMenuItem"}, |
689 "description": "Items to be shown in the context menu. These are top
level items as opposed to children items.", | 356 "description": "Items to be shown in the context menu. These are top
level items as opposed to children items.", |
690 "optional": true | 357 "optional": true |
691 } | 358 } |
692 ] | 359 ] |
693 }, | |
694 { | |
695 "name": "stop", | |
696 "type": "function", | |
697 "parameters": [ | |
698 { | |
699 "type": "integer", | |
700 "name": "instanceId" | |
701 } | |
702 ] | |
703 }, | |
704 { | |
705 "name": "terminate", | |
706 "type": "function", | |
707 "parameters": [ | |
708 { | |
709 "type": "integer", | |
710 "name": "instanceId" | |
711 } | |
712 ] | |
713 } | 360 } |
714 ], | 361 ], |
715 "events": [ | 362 "events": [ |
716 { | 363 { |
717 "name": "onClicked", | 364 "name": "onClicked", |
718 "type": "function", | 365 "type": "function", |
719 "nodoc": true, | 366 "nodoc": true, |
720 "$ref": "contextMenusInternal.onClicked" | 367 "$ref": "contextMenusInternal.onClicked" |
721 } | 368 } |
722 ] | 369 ] |
723 } | 370 } |
724 ] | 371 ] |
OLD | NEW |