| 1 | /* |
| 2 | * Copyright 2009 Google Inc. |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /** |
| 18 | * @fileoverview Externs file for OAuth specific functionality in the OpenSocial |
| 19 | * gadget libraries. Note this may not be comprehensive. |
| 20 | * @see http://code.google.com/apis/gadgets/docs/oauth.html |
| 21 | * @externs |
| 22 | */ |
| 23 | |
| 24 | |
| 25 | // Namespace for OAuth |
| 26 | gadgets.oauth = {}; |
| 27 | |
| 28 | |
| 29 | /** |
| 30 | * An OAuth popup for granting one time access to user data. |
| 31 | * @param {string} destination Target URL for the popup window. |
| 32 | * @param {string} windowOptions Options for window.open, used to specify |
| 33 | * look and feel of the window. |
| 34 | * @param {Function} openCallback Function to call when the window is |
| 35 | * opened. |
| 36 | * @param {Function} closeCallback Function to call when the window is |
| 37 | * closed. |
| 38 | * @constructor |
| 39 | */ |
| 40 | gadgets.oauth.Popup = function(destination, windowOptions, |
| 41 | openCallback, closeCallback) {}; |
| 42 | |
| 43 | /** |
| 44 | * @return {Function} An onclick handler for the "open the approval window" |
| 45 | * link |
| 46 | */ |
| 47 | gadgets.oauth.Popup.prototype.createOpenerOnClick = function() {}; |
| 48 | |
| 49 | /** |
| 50 | * @return {Function} An onclick handler for the "I've approved" link. |
| 51 | * This may not ever be called. If we successfully detect that the |
| 52 | * window was closed, this link is unnecessary. |
| 53 | */ |
| 54 | gadgets.oauth.Popup.prototype.createApprovedOnClick = function() {}; |
| 55 |