diff options
13 files changed, 172 insertions, 14 deletions
diff --git a/chrome/common/extensions/docs/build/directory.py b/chrome/common/extensions/docs/build/directory.py index aab27c2..bff011c 100644 --- a/chrome/common/extensions/docs/build/directory.py +++ b/chrome/common/extensions/docs/build/directory.py @@ -205,8 +205,8 @@ class SamplesManifest(object): samples = [] for path in manifest_paths: sample = Sample(path, api_methods, self._base_dir) - # Don't render apps - if sample.is_app() == False: + # Don't render hosted apps + if sample.is_hosted_app() == False: samples.append(sample) def compareSamples(sample1, sample2): @@ -549,7 +549,10 @@ class Sample(dict): Returns: A localized version of the sample's name. """ - return self._get_localized_manifest_value('name') + name = self._get_localized_manifest_value('name') + if (self.is_packaged_app()): + name += ' (packaged app)' + return name def _parse_protocols(self): """ Returns a list of protocols this extension requests permission for. @@ -654,9 +657,17 @@ class Sample(dict): self._manifest['page_action'].has_key('popup')) return has_b_popup or has_p_popup - def is_app(self): - """ Returns true if the extension has an 'app' section in its manifest.""" - return self._manifest.has_key('app') + def is_hosted_app(self): + """ Returns true if the manifest has an app but not a local_path.""" + return (self._manifest.has_key('app') and + (not self._manifest['app'].has_key('launch') or + not self._manifest['app']['launch'].has_key('local_path'))) + + def is_packaged_app(self): + """ Returns true if the manifest has an app/launch/local_path section.""" + return (self._manifest.has_key('app') and + self._manifest['app'].has_key('launch') and + self._manifest['app']['launch'].has_key('local_path')) def write_zip(self): """ Writes a zip file containing all of the files in this Sample's dir.""" diff --git a/chrome/common/extensions/docs/examples/api/devtools/network/chrome-firephp.zip b/chrome/common/extensions/docs/examples/api/devtools/network/chrome-firephp.zip Binary files differindex e53c72b..b3965d6 100644 --- a/chrome/common/extensions/docs/examples/api/devtools/network/chrome-firephp.zip +++ b/chrome/common/extensions/docs/examples/api/devtools/network/chrome-firephp.zip diff --git a/chrome/common/extensions/docs/examples/extensions/imageinfo.zip b/chrome/common/extensions/docs/examples/extensions/imageinfo.zip Binary files differindex 45faeb2..ed9ec00 100644 --- a/chrome/common/extensions/docs/examples/extensions/imageinfo.zip +++ b/chrome/common/extensions/docs/examples/extensions/imageinfo.zip diff --git a/chrome/common/extensions/docs/examples/extensions/ttsdebug.zip b/chrome/common/extensions/docs/examples/extensions/ttsdebug.zip Binary files differindex 5db3120..a654190 100644 --- a/chrome/common/extensions/docs/examples/extensions/ttsdebug.zip +++ b/chrome/common/extensions/docs/examples/extensions/ttsdebug.zip diff --git a/chrome/common/extensions/docs/examples/extensions/ttsdemo.zip b/chrome/common/extensions/docs/examples/extensions/ttsdemo.zip Binary files differindex f962877..e31f337 100644 --- a/chrome/common/extensions/docs/examples/extensions/ttsdemo.zip +++ b/chrome/common/extensions/docs/examples/extensions/ttsdemo.zip diff --git a/chrome/common/extensions/docs/experimental.devtools.console.html b/chrome/common/extensions/docs/experimental.devtools.console.html index 22df652..c9bca05 100644 --- a/chrome/common/extensions/docs/experimental.devtools.console.html +++ b/chrome/common/extensions/docs/experimental.devtools.console.html @@ -16,7 +16,8 @@ <script type="text/javascript" src="js/api_page_generator.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> <script type="text/javascript" src="js/sidebar.js"></script> - <title>chrome.experimental.devtools.console API - Google Chrome Extensions - Google Code</title></head> + <title>chrome.experimental.devtools.console +API - Google Chrome Extensions - Google Code</title></head> <body> <div id="gc-container" class="labs"> <div id="devModeWarning"> You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. diff --git a/chrome/common/extensions/docs/experimental.devtools.network.html b/chrome/common/extensions/docs/experimental.devtools.network.html index 6ccc66a..fef73d1 100644 --- a/chrome/common/extensions/docs/experimental.devtools.network.html +++ b/chrome/common/extensions/docs/experimental.devtools.network.html @@ -16,7 +16,8 @@ <script type="text/javascript" src="js/api_page_generator.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> <script type="text/javascript" src="js/sidebar.js"></script> - <title>chrome.experimental.devtools.network API - Google Chrome Extensions - Google Code</title></head> + <title>chrome.experimental.devtools.network +API - Google Chrome Extensions - Google Code</title></head> <body> <div id="gc-container" class="labs"> <div id="devModeWarning"> You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. diff --git a/chrome/common/extensions/docs/experimental.devtools.resources.html b/chrome/common/extensions/docs/experimental.devtools.resources.html index 10ddc82..34ddd17 100644 --- a/chrome/common/extensions/docs/experimental.devtools.resources.html +++ b/chrome/common/extensions/docs/experimental.devtools.resources.html @@ -16,7 +16,8 @@ <script type="text/javascript" src="js/api_page_generator.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> <script type="text/javascript" src="js/sidebar.js"></script> - <title>chrome.experimental.devtools.resources API - Google Chrome Extensions - Google Code</title></head> + <title>chrome.experimental.devtools.resources +API - Google Chrome Extensions - Google Code</title></head> <body> <div id="gc-container" class="labs"> <div id="devModeWarning"> You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. diff --git a/chrome/common/extensions/docs/experimental.webInspector.audits.html b/chrome/common/extensions/docs/experimental.webInspector.audits.html index 9cb6a35..3bcad27 100644 --- a/chrome/common/extensions/docs/experimental.webInspector.audits.html +++ b/chrome/common/extensions/docs/experimental.webInspector.audits.html @@ -16,7 +16,8 @@ <script type="text/javascript" src="js/api_page_generator.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> <script type="text/javascript" src="js/sidebar.js"></script> - <title>experimental.webInspector.audits API - Google Chrome Extensions - Google Code</title></head> + <title>experimental.webInspector.audits +API - Google Chrome Extensions - Google Code</title></head> <body> <div id="gc-container" class="labs"> <div id="devModeWarning"> You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. diff --git a/chrome/common/extensions/docs/experimental.webInspector.panels.html b/chrome/common/extensions/docs/experimental.webInspector.panels.html index 320ee1e..05845c7 100644 --- a/chrome/common/extensions/docs/experimental.webInspector.panels.html +++ b/chrome/common/extensions/docs/experimental.webInspector.panels.html @@ -16,7 +16,8 @@ <script type="text/javascript" src="js/api_page_generator.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> <script type="text/javascript" src="js/sidebar.js"></script> - <title>experimental.webInspector.panels API - Google Chrome Extensions - Google Code</title></head> + <title>experimental.webInspector.panels +API - Google Chrome Extensions - Google Code</title></head> <body> <div id="gc-container" class="labs"> <div id="devModeWarning"> You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. diff --git a/chrome/common/extensions/docs/experimental.webInspector.resources.html b/chrome/common/extensions/docs/experimental.webInspector.resources.html index 7b2beb9..69f6929 100644 --- a/chrome/common/extensions/docs/experimental.webInspector.resources.html +++ b/chrome/common/extensions/docs/experimental.webInspector.resources.html @@ -16,7 +16,8 @@ <script type="text/javascript" src="js/api_page_generator.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> <script type="text/javascript" src="js/sidebar.js"></script> - <title>experimental.webInspector.resources API - Google Chrome Extensions - Google Code</title></head> + <title>experimental.webInspector.resources +API - Google Chrome Extensions - Google Code</title></head> <body> <div id="gc-container" class="labs"> <div id="devModeWarning"> You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. diff --git a/chrome/common/extensions/docs/samples.html b/chrome/common/extensions/docs/samples.html index 711325e..08d31b6 100644 --- a/chrome/common/extensions/docs/samples.html +++ b/chrome/common/extensions/docs/samples.html @@ -371,6 +371,8 @@ "04f5d2ddea95746b0200be1ea223ccb7a748a771": "TALKING ALARM CLOCK A CLOCK WITH TWO CONFIGURABLE ALARMS THAT WILL PLAY A SOUND AND SPEAK A PHRASE OF YOUR CHOICE. BACKGROUND BACKGROUND_PAGE BROWSER_ACTION TTS CHROME.BROWSERACTION.SETICON CHROME.EXTENSION.CONNECT CHROME.EXTENSION.ONCONNECT CHROME.TTS.GETVOICES CHROME.TTS.SPEAK CHROME.TTS.STOP", "e1697cacebad05218798bf3e8a0f724517f0e8c3": "TEST SCREENSHOT EXTENSION DEMONSTRATE SCREENSHOT FUNCTIONALITY IN THE CHROME.TABS API. NOTE: ONLY WORKS FOR CODE.GOOGLE.COM BACKGROUND_PAGE BROWSER_ACTION TABS CHROME.BROWSERACTION.ONCLICKED CHROME.EXTENSION.GETURL CHROME.EXTENSION.GETVIEWS CHROME.TABS.CAPTUREVISIBLETAB CHROME.TABS.CREATE CHROME.TABS.ONUPDATED", "e8ac89b4015052cf11436985399129c927f972aa": "TOP CHROME EXTENSION QUESTIONS SAMPLE DEMONSTRATION OF THE OPTIONAL PERMISSIONS API. BROWSER_ACTION EXPERIMENTAL OPTIONS_PAGE CHROME.EXPERIMENTAL.PERMISSIONS.CONTAINS CHROME.EXPERIMENTAL.PERMISSIONS.ONADDED CHROME.EXPERIMENTAL.PERMISSIONS.ONREMOVED CHROME.EXPERIMENTAL.PERMISSIONS.REMOVE CHROME.EXPERIMENTAL.PERMISSIONS.REQUEST CHROME.TABS.CREATE", + "1d192cce77438e1a90383a6a3a6b28f29961ffa4": "TTS DEBUG (PACKAGED APP) TOOL FOR DEVELOPERS OF CHROME TTS ENGINE EXTENSIONS TO HELP THEM TEST THEIR ENGINES ARE IMPLEMENTING THE API CORRECTLY. TTS CHROME.TTS.GETVOICES CHROME.TTS.SPEAK CHROME.TTS.STOP", + "3a1baf15462bdae4d886c2da4ff8f35f4e8ce02f": "TTS DEMO (PACKAGED APP) DEMO CHROMES SYNTHESIZED TEXT-TO-SPEECH CAPABILITIES. TTS CHROME.TTS.GETVOICES CHROME.TTS.ISSPEAKING CHROME.TTS.SPEAK CHROME.TTS.STOP", "b3de91ab04b7d7a2670ca7ee9d740eb42cead0b6": "TYPED URL HISTORY READS YOUR HISTORY, AND SHOWS THE TOP TEN PAGES YOU GO TO BY TYPING THE URL. BROWSER_ACTION HISTORY TABS CHROME.HISTORY.GETVISITS CHROME.HISTORY.SEARCH CHROME.TABS.CREATE", "a3c674f7eb93621c590562ad3fa04de4f03f53a0": "WEBNAVIGATION TECH DEMO DEMONSTRATION OF THE WEBNAVIGATION EXTENSION API. BACKGROUND_PAGE BROWSER_ACTION EXTENSION POPUP WEBNAVIGATION CHROME.EXTENSION.ONREQUEST CHROME.EXTENSION.SENDREQUEST CHROME.I18N.GETMESSAGE CHROME.WEBNAVIGATION.ONBEFORENAVIGATE CHROME.WEBNAVIGATION.ONCOMMITTED CHROME.WEBNAVIGATION.ONCOMPLETED CHROME.WEBNAVIGATION.ONCREATEDNAVIGATIONTARGET CHROME.WEBNAVIGATION.ONERROROCCURRED CHROME.WEBNAVIGATION.ONREFERENCEFRAGMENTUPDATED", "0fa4abe6545f0316fea7cfa07c53aa48c4f3d018": "`EXTENSION.ISALLOWED???ACCESS` EXAMPLE DEMONSTRATES THE `EXTENSION.ISALLOWED???ACCESS` APIS BROWSER_ACTION CHROME.EXTENSION.ISALLOWEDFILESCHEMEACCESS CHROME.EXTENSION.ISALLOWEDINCOGNITOACCESS" @@ -3896,6 +3898,94 @@ - <a href="examples/api/permissions/extension-questions.crx">Install extension</a> </span> </div> +</div><div class="sample" id="1d192cce77438e1a90383a6a3a6b28f29961ffa4"> + <img class="icon" src="examples/extensions/ttsdebug/128.png"> + <img class="icon" src="images/sample-default-icon.png" style="display: none; "> + <h2 class="name"> + <a href="#1d192cce77438e1a90383a6a3a6b28f29961ffa4">TTS Debug (packaged app)</a> + </h2> + <p class="metadata features">Uses + <span> + <strong>tts</strong><span style="display: none; ">, </span> + <span style="display: none; "> and</span> + </span> + </p> + <p>Tool for developers of Chrome TTS engine extensions to help them test their engines are implementing the API correctly.</p> + <div class="apicalls"><strong>Calls:</strong> + <ul> + <li> + <code><a href="tts.html#method-getVoices">chrome.tts.getVoices</a></code> + </li><li> + <code><a href="tts.html#method-speak">chrome.tts.speak</a></code> + </li><li> + <code><a href="tts.html#method-stop">chrome.tts.stop</a></code> + </li> + </ul> + </div> + <div class="sourcefiles"><strong>Source files:</strong> + <ul> + <li> + <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/ttsdebug/manifest.json?content-type=text/plain">manifest.json</a></code> + </li><li> + <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/ttsdebug/ttsdebug.html?content-type=text/plain">ttsdebug.html</a></code> + </li><li> + <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/ttsdebug/ttsdebug.js?content-type=text/plain">ttsdebug.js</a></code> + </li> + </ul> + </div> + <div> + <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/ttsdebug/">Browse source</a> + - <a href="examples/extensions/ttsdebug.zip">Download source</a> + <!-- Only show the Install CRX link if a CRX file is provided --> + <span style="display: none; "> + - <a>Install extension</a> + </span> + </div> +</div><div class="sample" id="3a1baf15462bdae4d886c2da4ff8f35f4e8ce02f"> + <img class="icon" src="examples/extensions/ttsdemo/128.png"> + <img class="icon" src="images/sample-default-icon.png" style="display: none; "> + <h2 class="name"> + <a href="#3a1baf15462bdae4d886c2da4ff8f35f4e8ce02f">TTS Demo (packaged app)</a> + </h2> + <p class="metadata features">Uses + <span> + <strong>tts</strong><span style="display: none; ">, </span> + <span style="display: none; "> and</span> + </span> + </p> + <p>Demo Chrome's synthesized text-to-speech capabilities.</p> + <div class="apicalls"><strong>Calls:</strong> + <ul> + <li> + <code><a href="tts.html#method-getVoices">chrome.tts.getVoices</a></code> + </li><li> + <code><a href="tts.html#method-isSpeaking">chrome.tts.isSpeaking</a></code> + </li><li> + <code><a href="tts.html#method-speak">chrome.tts.speak</a></code> + </li><li> + <code><a href="tts.html#method-stop">chrome.tts.stop</a></code> + </li> + </ul> + </div> + <div class="sourcefiles"><strong>Source files:</strong> + <ul> + <li> + <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/ttsdemo/manifest.json?content-type=text/plain">manifest.json</a></code> + </li><li> + <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/ttsdemo/ttsdemo.html?content-type=text/plain">ttsdemo.html</a></code> + </li><li> + <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/ttsdemo/ttsdemo.js?content-type=text/plain">ttsdemo.js</a></code> + </li> + </ul> + </div> + <div> + <a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/ttsdemo/">Browse source</a> + - <a href="examples/extensions/ttsdemo.zip">Download source</a> + <!-- Only show the Install CRX link if a CRX file is provided --> + <span style="display: none; "> + - <a>Install extension</a> + </span> + </div> </div><div class="sample" id="b3de91ab04b7d7a2670ca7ee9d740eb42cead0b6"> <img class="icon" style="display: none; "> <img class="icon" src="images/sample-default-icon.png"> diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json index 5fcc657..3c09637 100644 --- a/chrome/common/extensions/docs/samples.json +++ b/chrome/common/extensions/docs/samples.json @@ -893,7 +893,7 @@ "devtools.js", "manifest.json" ], - "source_hash": "b607f6ca8f1ccf4343766b480ae21bb220dd949c", + "source_hash": "4d6a2fc67a692883e75a427b416bf782eda57cee", "zip_path": "examples\/api\/devtools\/network\/chrome-firephp.zip" }, { @@ -1252,7 +1252,7 @@ "info.html", "manifest.json" ], - "source_hash": "c746d9114348f4b414c1ec05e988e2807feb963a", + "source_hash": "672f49ed8edbe0829c7ba5a1d890b4440b157991", "zip_path": "examples\/extensions\/imageinfo.zip" }, { @@ -2133,6 +2133,57 @@ }, { "api_calls": [ + "chrome.tts.getVoices", + "chrome.tts.speak", + "chrome.tts.stop" + ], + "crx_path": null, + "description": "Tool for developers of Chrome TTS engine extensions to help them test their engines are implementing the API correctly.", + "features": [ + "tts" + ], + "icon": "128.png", + "id": "1d192cce77438e1a90383a6a3a6b28f29961ffa4", + "name": "TTS Debug (packaged app)", + "path": "examples\/extensions\/ttsdebug\/", + "protocols": [], + "search_string": "TTS DEBUG (PACKAGED APP) TOOL FOR DEVELOPERS OF CHROME TTS ENGINE EXTENSIONS TO HELP THEM TEST THEIR ENGINES ARE IMPLEMENTING THE API CORRECTLY. TTS CHROME.TTS.GETVOICES CHROME.TTS.SPEAK CHROME.TTS.STOP", + "source_files": [ + "manifest.json", + "ttsdebug.html", + "ttsdebug.js" + ], + "source_hash": "e81705ac4dd9a820b403e2b77d07e72b5de0198e", + "zip_path": "examples\/extensions\/ttsdebug.zip" + }, + { + "api_calls": [ + "chrome.tts.getVoices", + "chrome.tts.isSpeaking", + "chrome.tts.speak", + "chrome.tts.stop" + ], + "crx_path": null, + "description": "Demo Chrome's synthesized text-to-speech capabilities.", + "features": [ + "tts" + ], + "icon": "128.png", + "id": "3a1baf15462bdae4d886c2da4ff8f35f4e8ce02f", + "name": "TTS Demo (packaged app)", + "path": "examples\/extensions\/ttsdemo\/", + "protocols": [], + "search_string": "TTS DEMO (PACKAGED APP) DEMO CHROMES SYNTHESIZED TEXT-TO-SPEECH CAPABILITIES. TTS CHROME.TTS.GETVOICES CHROME.TTS.ISSPEAKING CHROME.TTS.SPEAK CHROME.TTS.STOP", + "source_files": [ + "manifest.json", + "ttsdemo.html", + "ttsdemo.js" + ], + "source_hash": "c848fa77d649be391e365b3ce6f003a18bdbc7a7", + "zip_path": "examples\/extensions\/ttsdemo.zip" + }, + { + "api_calls": [ "chrome.history.getVisits", "chrome.history.search", "chrome.tabs.create" |