diff options
12 files changed, 100 insertions, 870 deletions
diff --git a/chrome/common/extensions/docs/server2/app.yaml b/chrome/common/extensions/docs/server2/app.yaml index 29b5aa7..a278392 100644 --- a/chrome/common/extensions/docs/server2/app.yaml +++ b/chrome/common/extensions/docs/server2/app.yaml @@ -1,5 +1,5 @@ application: chrome-apps-doc -version: 3-2-0 +version: 3-3-0 runtime: python27 api_version: 1 threadsafe: false diff --git a/chrome/common/extensions/docs/server2/content_provider.py b/chrome/common/extensions/docs/server2/content_provider.py index 817a280..6256298 100644 --- a/chrome/common/extensions/docs/server2/content_provider.py +++ b/chrome/common/extensions/docs/server2/content_provider.py @@ -87,18 +87,14 @@ class ContentProvider(object): return ContentAndType(content, mimetype) def _MaybeMarkdown(self, path): - if posixpath.splitext(path)[1] != '.html': + base, ext = posixpath.splitext(path) + if ext != '.html': return path - - dirname, file_name = posixpath.split(path) - if dirname != '': - dirname = dirname + '/' - file_list = self.file_system.ReadSingle(dirname).Get() - if file_name in file_list: + if self.file_system.Exists(path).Get(): return path - - if posixpath.splitext(file_name)[0] + '.md' in file_list: - return posixpath.splitext(path)[0] + '.md' + as_md = base + '.md' + if self.file_system.Exists(as_md).Get(): + return as_md return path def GetContentAndType(self, path): @@ -117,8 +113,11 @@ class ContentProvider(object): # Running Refresh() on the file system is enough to pull GitHub content, # which is all we need for now while the full render-every-page cron step # is in effect. - # TODO(kalman): Walk over the whole filesystem and compile the content. - return self.file_system.Refresh() + futures = [] + for root, _, files in self.file_system.Walk(''): + futures += [self.GetContentAndType(posixpath.join(root, filename)) + for filename in files] + return Future(delegate=Gettable(lambda: [f.Get() for f in futures])) def __repr__(self): return 'ContentProvider of <%s>' % repr(self.file_system) diff --git a/chrome/common/extensions/docs/server2/cron.yaml b/chrome/common/extensions/docs/server2/cron.yaml index 72ebc6f..124c0a2 100644 --- a/chrome/common/extensions/docs/server2/cron.yaml +++ b/chrome/common/extensions/docs/server2/cron.yaml @@ -2,4 +2,4 @@ cron: - description: Repopulates all cached data. url: /_cron schedule: every 5 minutes - target: 3-2-0 + target: 3-3-0 diff --git a/chrome/common/extensions/docs/server2/future.py b/chrome/common/extensions/docs/server2/future.py index 0e9ef24..4a903440 100644 --- a/chrome/common/extensions/docs/server2/future.py +++ b/chrome/common/extensions/docs/server2/future.py @@ -7,6 +7,13 @@ import sys _no_value = object() +def Collect(futures): + '''Creates a Future which returns a list of results from each Future in + |futures|. + ''' + return Future(delegate=Gettable(lambda: [f.Get() for f in futures])) + + class Gettable(object): '''Allows a Future to accept a callable as a delegate. Wraps |f| in a .Get interface required by Future. diff --git a/chrome/common/extensions/docs/server2/integration_test.py b/chrome/common/extensions/docs/server2/integration_test.py index d875dc9..7bc6dc3 100755 --- a/chrome/common/extensions/docs/server2/integration_test.py +++ b/chrome/common/extensions/docs/server2/integration_test.py @@ -18,14 +18,16 @@ import unittest from branch_utility import BranchUtility from chroot_file_system import ChrootFileSystem -from extensions_paths import EXTENSIONS, PUBLIC_TEMPLATES +from extensions_paths import CONTENT_PROVIDERS, EXTENSIONS, PUBLIC_TEMPLATES from fake_fetchers import ConfigureFakeFetchers +from third_party.json_schema_compiler import json_parse from handler import Handler from link_error_detector import LinkErrorDetector, StringifyBrokenLinks from local_file_system import LocalFileSystem from local_renderer import LocalRenderer from servlet import Request -from test_util import EnableLogging, DisableLogging, ChromiumPath +from test_util import ChromiumPath, DisableLogging, EnableLogging, ReadFile + # Arguments set up if __main__ specifies them. _EXPLICIT_TEST_FILES = None @@ -36,19 +38,44 @@ _VERBOSE = False def _ToPosixPath(os_path): return os_path.replace(os.sep, '/') + +def _FilterHidden(paths): + '''Returns a list of the non-hidden paths from |paths|. + ''' + # Hidden files start with a '.' but paths like './foo' and '../foo' are not + # hidden. + return [path for path in paths if (not path.startswith('.')) or + path.startswith('./') or + path.startswith('../')] + + def _GetPublicFiles(): - '''Gets all public files mapped to their contents. + '''Gets all public file paths mapped to their contents. ''' - public_path = ChromiumPath(PUBLIC_TEMPLATES) + def walk(path, prefix=''): + path = ChromiumPath(path) + public_files = {} + for root, dirs, files in os.walk(path, topdown=True): + relative_root = root[len(path):].lstrip(os.path.sep) + dirs[:] = _FilterHidden(dirs) + for filename in _FilterHidden(files): + with open(os.path.join(root, filename), 'r') as f: + request_path = posixpath.join(prefix, relative_root, filename) + public_files[request_path] = f.read() + return public_files + + # Public file locations are defined in content_providers.json, sort of. Epic + # hack to pull them out; list all the files from the directories that + # Chromium content providers ask for. public_files = {} - for path, dirs, files in os.walk(public_path, topdown=True): - dirs[:] = [d for d in dirs if d != '.svn'] - relative_posix_path = _ToPosixPath(path[len(public_path):]) - for filename in files: - with open(os.path.join(path, filename), 'r') as f: - public_files['/'.join((relative_posix_path, filename))] = f.read() + content_providers = json_parse.Parse(ReadFile(CONTENT_PROVIDERS)) + for content_provider in content_providers.itervalues(): + if 'chromium' in content_provider: + public_files.update(walk(content_provider['chromium']['dir'], + prefix=content_provider['serveFrom'])) return public_files + class IntegrationTest(unittest.TestCase): def setUp(self): ConfigureFakeFetchers() @@ -123,7 +150,7 @@ class IntegrationTest(unittest.TestCase): start_time = time.time() try: for path, content in public_files.iteritems(): - assert path.startswith('/') + assert not path.startswith('/') if path.endswith('redirects.json'): continue @@ -133,27 +160,34 @@ class IntegrationTest(unittest.TestCase): # This is reaaaaally rough since usually these will be tiny templates # that render large files. At least it'll catch zero-length responses. self.assertTrue(len(response.content) >= len(content), - 'Content was "%s" when rendering %s' % (response.content, path)) + 'Rendered content length was %s vs template content length %s ' + 'when rendering %s' % (len(response.content), len(content), path)) check_result(Handler(Request.ForTest(path)).Get()) - # Make sure that leaving out the .html will temporarily redirect to the - # path with the .html. - if path.startswith(('/apps/', '/extensions/')): - redirect_result = Handler( - Request.ForTest(posixpath.splitext(path)[0])).Get() - self.assertEqual((path, False), redirect_result.GetRedirect()) + if path.startswith(('apps/', 'extensions/')): + # Make sure that leaving out the .html will temporarily redirect to + # the path with the .html for APIs and articles. + if '/examples/' not in path: + base, _ = posixpath.splitext(path) + self.assertEqual( + ('/' + path, False), + Handler(Request.ForTest(base)).Get().GetRedirect(), + '%s did not (temporarily) redirect to %s.html' % (path, path)) - # Make sure including a channel will permanently redirect to the same - # path without a channel. - for channel in BranchUtility.GetAllChannelNames(): - redirect_result = Handler( - Request.ForTest('%s%s' % (channel, path))).Get() - self.assertEqual((path, True), redirect_result.GetRedirect()) + # Make sure including a channel will permanently redirect to the same + # path without a channel. + for channel in BranchUtility.GetAllChannelNames(): + redirect_result = Handler( + Request.ForTest(posixpath.join(channel, path))).Get() + self.assertEqual( + ('/' + path, True), + redirect_result.GetRedirect(), + '%s did not redirect to strip channel %s' % (path, channel)) # Samples are internationalized, test some locales. if path.endswith('/samples.html'): - for lang in ['en-US', 'es', 'ar']: + for lang in ('en-US', 'es', 'ar'): check_result(Handler(Request.ForTest( path, headers={'Accept-Language': '%s;q=0.8' % lang})).Get()) diff --git a/chrome/common/extensions/docs/server2/template_data_source.py b/chrome/common/extensions/docs/server2/template_data_source.py index aa1ee543..ffd2385 100644 --- a/chrome/common/extensions/docs/server2/template_data_source.py +++ b/chrome/common/extensions/docs/server2/template_data_source.py @@ -3,12 +3,13 @@ # found in the LICENSE file. import logging +import posixpath import traceback from data_source import DataSource from extensions_paths import PRIVATE_TEMPLATES from file_system import FileNotFoundError -from future import Future +from future import Collect class TemplateDataSource(DataSource): @@ -19,6 +20,7 @@ class TemplateDataSource(DataSource): self._template_cache = server_instance.compiled_fs_factory.ForTemplates( server_instance.host_file_system_provider.GetTrunk()) self._partial_dir = partial_dir + self._file_system = server_instance.host_file_system_provider.GetTrunk() def get(self, path): try: @@ -29,6 +31,10 @@ class TemplateDataSource(DataSource): return None def Cron(self): - # TODO(kalman): Implement this; probably by finding all files that can be - # compiled to templates underneath |self._partial_dir| and compiling them. - return Future(value=()) + futures = [] + for root, _, files in self._file_system.Walk(self._partial_dir): + futures += [self._template_cache.GetFromFile( + posixpath.join(self._partial_dir, root, f)) + for f in files + if posixpath.splitext(f)[1] == '.html'] + return Collect(futures) diff --git a/chrome/common/extensions/docs/server2/template_renderer.py b/chrome/common/extensions/docs/server2/template_renderer.py index 87bc5af..a6b8d65 100644 --- a/chrome/common/extensions/docs/server2/template_renderer.py +++ b/chrome/common/extensions/docs/server2/template_renderer.py @@ -36,6 +36,10 @@ class TemplateRenderer(object): 'apps_samples_url': GITHUB_BASE, 'base_path': self._server_instance.base_path, 'extensions_samples_url': EXTENSIONS_SAMPLES, + # TODO(kalman): Figure out where "pepperversion" comes from. It's used + # internally in pepper and unfortunately the syntax appears to be + # {{pepperversion}} for some reason. + 'pepperversion': '', 'static': self._server_instance.base_path + 'static', }) if additional_context: diff --git a/chrome/common/extensions/docs/templates/json/content_providers.json b/chrome/common/extensions/docs/templates/json/content_providers.json index 9018886..afdedc5 100644 --- a/chrome/common/extensions/docs/templates/json/content_providers.json +++ b/chrome/common/extensions/docs/templates/json/content_providers.json @@ -41,13 +41,13 @@ // this to true. Otherwise, it's safer and more efficient to omit it. { - //"cr-chrome-docs-home": { - //"chromium": { - //"dir": "chrome/docs" - //}, - //"serveFrom": "home", - //"supportsTemplates": true - //}, + "cr-chrome-docs-home": { + "chromium": { + "dir": "chrome/docs" + }, + "serveFrom": "home", + "supportsTemplates": true + }, "cr-extensions-examples": { "chromium": { "dir": "chrome/common/extensions/docs/examples" diff --git a/chrome/common/extensions/docs/templates/public/home/devtools-pillar.html b/chrome/common/extensions/docs/templates/public/home/devtools-pillar.html deleted file mode 100644 index 00f5bca..0000000 --- a/chrome/common/extensions/docs/templates/public/home/devtools-pillar.html +++ /dev/null @@ -1,234 +0,0 @@ -{{+content:partials.site}} -<div class="pillar-content"> - - <h1>Chrome Developer Tools</h1> - - <section class="article-list g-section"> - <article class="new"> - <h4 class="label">Styles & the DOM</h4> - <h2>Editing Styles and the DOM</h2> - <p> - Use DevTools to do real-time editing of your web page. You can edit the DOM directly or the CSS Style and see your changes rendered immediately. - </p> - <p><a href="docs/dom-and-styles.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/dom-pillar.png" alt="these should have alt text"> - </article> - - <article class="new"> - <h4 class="label">Mobile DevTools</h4> - <h2>Remote Debugging on Android</h2> - <p> - - You can now access your Android device directly in DevTools on your dev machine. Just plug it in over USB and you can view and debug! - </p> - <p><a href="docs/remote-debugging.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/remote-debugging-pillar.jpg" alt="these should have alt text"> - </article> - - <article> - <h4 class="label">Learn Basics</h4> - <h2>DevTools Overview</h2> - <p> - A starting place if you haven't used DevTools before - this page will tell you everything you need to get started with the Chrome DevTools, from how to access the tools to a brief explanation of what the various menus and panels are used for. - </p> - <p><a href="index.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Command-line debugging</h4> - <h2>Using the console</h2> - <p> - The Javascript console in DevTools can be used to debug your Javascript code and log diagnostics, or you can also just use it as a shell to try out Javascript commands and interact with pages. - </p> - <p><a href="docs/console.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/console-pillar.png" alt="these should have alt text"> - </article> - - <article> - <h4 class="label">Mobile DevTools</h4> - <h2>Mobile Emulation</h2> - <p> - Need to debug for a device but don't have the device on hand? DevTools can emulate many devices -- screen dimensions, touch events, geolocation, and user spoofing. - </p> - <p><a href="docs/mobile-emulation.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/emulation-pillar.png" alt="these should have alt text"> - </article> - - <article> - <h4 class="label">Learn Basics</h4> - <h2>Keyboard Shortcuts</h2> - <p> - Save more time in your development workflow -- here is a page full of keyboard shortcuts that will make things quicker when you are using DevTools. - </p> - <p><a href="docs/shortcuts.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/shortcuts-pillar.JPG" alt="these should have alt text"> - </article> - - <article> - <h4 class="label">Performance and Profiling</h4> - <h2>Javascript Memory Profiling</h2> - <p> - Does your page use too much memory or have a memory leak? Find out how to get and analyze a heap profile. - </p> - <p><a href="docs/javascript-memory-profiling.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/memory-pillar.png" alt="these should have alt text"> - </article> - - <article> - <h4 class="label">Performance and Profiling</h4> - <h2>Performance Profiling: Timelines</h2> - <p> - Is your site running slow? Analyze times for events, scripting, rendering, and painting using the Timeline. - </p> - <p><a href="docs/timeline.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/timeline-pillar.png" alt="these should have alt text"> - </article> - - <article> - <h4 class="label">Performance and Profiling</h4> - <h2>Javascript CPU Profiler</h2> - <p> - Find out how much CPU is being spent on your various Javascript functions with the Javascript CPU Profiler. - </p> - <p><a href="docs/cpu-profiling.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/cpuprofiler-pillar.png" alt="these should have alt text"> - </article> - - <article> - <h4 class="label">Performance and Profiling</h4> - <h2>Flame Charts</h2> - <p> - Flame charts show you a visualization of the call stack of your Javascript functions, and you can quickly find out how long each individual call takes. - </p> - <p><a href="docs/flame-charts.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/flamechart-pillar.png" alt="these should have alt text"> - </article> - - <article> - <h4 class="label">Debugging Tools</h4> - <h2>Javascript Debugging</h2> - <p> - Need to debug your Javascript? DevTools has a suite of tools to let you step through code, set breakpoints, handle exceptions, and so on. - </p> - <p><a href="docs/javascript-debugging.html">Learn more</a></p> - <img src="{{static}}/images/devtools-pillar/jsdebugger-pillar.png" alt="these should have alt text"> - </article> - - <article> - <h4 class="label">Command-line debugging</h4> - <h2>Console API reference</h2> - <p> - Javascript functions you can call within the console or within your programs to log various results to the console. - </p> - <p><a href="docs/console-api.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Command-line debugging</h4> - <h2>Command Line API reference</h2> - <p> - Functions that you can call in the console for performing common tasks within the DevTools. - </p> - <p><a href="docs/console-api.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Learn Basics</h4> - <h2>Tips and Tricks</h2> - <p> - Various tips and tricks on things within the DevTools. - </p> - <p><a href="docs/tips-and-tricks.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">DevTools Reference</h4> - <h2>Settings</h2> - <p> - Let's learn some more about what you can control in the Settings panel. - </p> - <p><a href="docs/settings.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Learn Basics</h4> - <h2>Authoring and Development Workflow</h2> - <p> - Do you find that DevTools saves you some time and you wonder how to save more? This page guides you through some ways to make your w\ -orkflow more efficient, both in editing files and styles but also with your Javascript and how you use the DevTools in general. - </p> - <p><a href="docs/authoring-development-workflow.html">Learn more\ -</a></p> - </article> - - <article> - <h4 class="label">Styles & The DOM</h4> - <h2>Working with CSS Preprocessors</h2> - <p> - Are you using a CSS preprocessor such as Sass, Less, or Stylus? You can live-edit your preprocessor source files in DevTools as easi\ -ly as editing straight CSS, and enable CSS source maps. - </p> - <p><a href="docs/css-preprocessors.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Mobile DevTools</h4> - <h2>Remote Debugging Protocol</h2> - <p> - Although we encourage you to use the new Screencast for debugging your Android devices, we do have Javascript runtime bindings for al\ -lowing DevTools to interact with mobile Chrome devices. - </p> - <p><a href="docs/debugger-protocol.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Contribute</h4> - <h2>Integrating with DevTools</h2> - <p> - Write new extensions and protocol clients to make new features for Chrome DevTools! - </p> - <p><a href="docs/integrating.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Learn Basics</h4> - <h2>Videos</h2> - <p> - Videos to get you started learning about Chrome DevTools. - </p> - <p><a href="docs/videos.html">Learn more</a></p> - </article> - - </section> - - <section class="g-section g-tpl-33-67" id="further-resources"> - <h2>Further Resources</h2> - <div class="g-unit g-first"> - <article class="g-content"> - <h2 class="school">Code School</h2> - <p>Explore and master the DevTools with our free "discover DevTools" courses. - <p><a href="http://discover-devtools.codeschool.com/">Learn more</a></p> - </article> - </div> - <div class="g-unit"> - <div class="g-section g-tpl-50-50"> - <div class="g-unit g-first"> - <article class="g-content"> - <h2 class="chat">Get Involved</h2> - <p>Summit a bug or a feature request on DevTools, and help the community get better. - <p><a href="docs/contributing.html">Learn more</a></p> - </article> - </div> - <div class="g-unit g-last"> - <article class="g-content"> - <h2 class="puzzle">Debug Extensions</h2> - <p>Looking to use the DevTools to debug Chrome extensions? Watch our videos for more info. - <p><a href="docs/videos.html">Learn more</a></p> - </article> - </div> - </div> - </div> - </section> - -</div> -{{/partials.site}} diff --git a/chrome/common/extensions/docs/templates/public/home/index.html b/chrome/common/extensions/docs/templates/public/home/index.html deleted file mode 100644 index 4c54f9f..0000000 --- a/chrome/common/extensions/docs/templates/public/home/index.html +++ /dev/null @@ -1,115 +0,0 @@ -{{+content:partials.site}} - -<section class="g-section g-tpl-67-33"> - <div class="g-unit g-first"> - <article class="g-content" id="featured"> - <a href="/devtools/remote-debugging.html"><img src="{{static}}/images/mocks/multidevice.png" class="screenshot"></a> - <h4 class="label">Featured article</h4> - <a href="/devtools/remote-debugging.html"><h1>Mobile DevTools: Remote Debugging for Android with Screencast</h1></a> - <p class="description"> - Until now, while remote debugging a mobile device, - you had to shift your eyes back and forth between the device and your desktop machine. - Now Screencast displays your device's screen right inside of Chrome DevTools on your desktop. - </p> - - <p> - You can also interact with your mobile device from your desktop, - as clicks on the screencast get translated into taps and touch events. - Typing on the desktop keyboard also sends keystrokes to the device -- - much better than typing with your thumbs! - </p> - <p><button class="button"><a href ="/devtools/remote-debugging.html">Learn more</a></button></p> - </article> - </div> - <div class="g-unit g-last" id="upcoming-events"> - <article class="g-content"> - <a href="https://developers.google.com/live/shows/5371585095532544-5707702298738688"><img src="{{static}}/images/mocks/udacity.png" class="screenshot"></a> - <h4 class="label">Upcoming Event</h4> - <a href="https://developers.google.com/live/shows/5371585095532544-5707702298738688"><h2>Udacity Mobile Web Dev Office Hours</h2></a> - <p class="description"><a href="https://developers.google.com/live/shows/5371585095532544-5707702298738688">Learn more</a></p> - </article> - <article class="g-content"> - <a href="https://developers.google.com/live/shows/5035410623299584"><img src="{{static}}/images/mocks/webview_video_thumb.png" class="screenshot"></a> - <h4 class="label">Google Developers Live</h4> - <a href="https://developers.google.com/live/shows/5035410623299584"><h2>Chrome WebView Debugging</h2></a> - <p class="description"><a href="https://developers.google.com/live/shows/5035410623299584">Watch the episode</a></p> - </article> - </div> -</section> - -<section id="site-sections" class="g-section g-tpl-33-67"> - <div class="g-unit g-first"> - <article class="g-content"> - <a href="/home/devtools-pillar.html"><h2 class="devtools">Chrome DevTools</h2></a> - <p class="description">The Chrome Developer Tools are a set of web authoring and debugging tools built right into Google Chrome.</p> - <p><a href="/home/devtools-pillar.html">Learn more about DevTools</a></p> - </article> - </div> - <div class="g-unit"> - <div class="g-section g-tpl-50-50"> - <div class="g-unit g-first"> - <article class="g-content"> - <a href="/home/multi-device-pillar.html"><h2 class="multidevice">Multi-Device</h2></a> - <p class="description">Chrome runs on tablets, smartphones, and other devices. - Make your content ready for the multi-device web!</p> - <p><a href="/home/multi-device-pillar.html">Learn more about Multi-Device</a></p> - </article> - </div> - <div class="g-unit g-last"> - <article class="g-content"> - <a href="/home/platform-pillar.html"><h2 class="platform">Platform</h2></a> - <p class="description">Build Chrome Apps and Extensions and publish in Store. With Native Client, -compile native code and run in any website.</p> - <p><a href="/home/platform-pillar.html">Learn more about Platform</a></p> - </article> - </div> - </div> - </div> -</section> - -<section id="developer-news" class="g-section g-tpl-33-67 more-section"> - <h1>Further Resources</h1> - <div class="g-unit g-first"> - <article class="g-content"> - <h2>Forums</h2> - <p> - <ul> - <li><a href="https://groups.google.com/a/chromium.org/">chromium.org Groups</a></li> - <li><a href="https://groups.google.com/forum/#!forum/native-client-discuss">Native Client Group</a></li> - <li><a href="http://stackoverflow.com/tags/google-chrome">google-chrome on Stack Overflow</a> - </li> - </ul> - </p> - </article> - </div> - <div class="g-unit"> - <div class="g-section g-tpl-50-50"> - <div class="g-unit g-first"> - <article class="g-content"> - <h2>Languages & Libraries</h2> - <p> - <ul> - <li><a href="http://www.polymer-project.org/">Polymer</a></li> - <li><a href="https://www.dartlang.org/">Dart</a> - </li> - </ul> - </p> - </article> - </div> - <div class="g-unit g-last"> - <article class="g-content"> - <h2>Open Web Docs</h2> - <ul> - <li><a href="http://www.html5rocks.com/en/">HTML5 Rocks</a> - </li> - <li><a href="http://www.webplatform.org/">WebPlatform.org</a></li> - </ul> - </p> - </article> - </div> - </div> - </div> -</section> - -{{/partials.site}} - diff --git a/chrome/common/extensions/docs/templates/public/home/multi-device-pillar.html b/chrome/common/extensions/docs/templates/public/home/multi-device-pillar.html deleted file mode 100644 index 65b7610..0000000 --- a/chrome/common/extensions/docs/templates/public/home/multi-device-pillar.html +++ /dev/null @@ -1,96 +0,0 @@ -{{+content:partials.site}} -<div class="pillar-content"> - - <h1>Multi-Device Chrome</h1> - - <section class="article-list g-section"> - <article> - <h4 class="label">Overview</h4> - <h2>Chrome for a Multi-Device World</h2> - <p>Chrome runs on computers, tablets, smartphones, and other devices. - Learn how to tailor your sites and apps for a multi-device world. - </p> - <p><a href="/multidevice/index.html">Learn more</a></p> - <img src="{{static}}/images/multi-device-pillar/multidevice.png" alt="mobile devices running Chrome"> - </article> - - <article class="new"> - <h4 class="label">Chrome for Android</h4> - <h2>Add to Homescreen</h2> - <p><b>Add to homescreen</b> lets Android users add an application shortcut icon to their - device's homescreen. Applications launched from the shortcut icon run in fullscreen - mode, and appear as separate applications in the task switcher. - </p> - <p><a href="/multidevice/android/installtohomescreen.html">Learn more</a></p> - <img src="{{static}}/images/multi-device-pillar/addtohomescreen.png" alt="add to homescreen item"> - </article> - - <article class="new"> - <h4 class="label">Chrome WebView for Android</h4> - <h2>Getting Started</h2> - <p><b>Get started writing a WebView-based application.</b> A primer on using the - Android WebView to host web content.</p> - <p><a href="/multidevice/webview/gettingstarted.html">Learn more</a></p> - <img src="{{static}}/images/multi-device-pillar/webview_gs.png" alt="Android device running WebView app"> - </article> - - <article class="new"> - <h4 class="label">Chrome WebView for Android</h4> - <h2>WebView Workflow</h2> - <p><b>Add web libraries and tools to your WebView-based application.</b> Update the Android Studio - build scripts to add web-specific build steps, and integrate Grunt into the Android build process.</p> - <p><a href="/multidevice/webview/workflow.html">Learn more</a></p> - <img src="{{static}}/images/multi-device-pillar/workflow.png" alt="Grunt and Yeoman logos"> - </article> - - <article> - <h4 class="label">Chrome for iOS</h4> - <h2>Opening links in Chrome for iOS</h2> - <p><b>In iOS, there are several methods for opening links in Chrome.</b> On iOS, URLs are opened in - Safari by default. However, applications can check whether Chrome is installed, and explicitly - open links in Chrome if desired. - </p> - <p><a href="/multidevice/ios/links.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Chrome for Android</h4> - <h2>Android Intents with Chrome</h2> - <p><b>Using an Android Intent URI lets you launch Android apps directly from a web page - or web application.</b> - </p> - <p><a href="/multidevice/android/intents.html">Learn more</a></p> - </article> - - - <!-- - <div class="load-more-articles"> - <a href="" class="nav-arrow down-arrow">More articles</a> - </div> - --> - - </section> - - <section class="g-section g-tpl-50-50"> - <h2>Further Resources</h2> - <div class="g-unit g-first"> - <article class="g-content"> - <h2>Debug with DevTools</h2> - <p>Use Chrome DevTools to debug apps running in your Android devices.</p> - <p><a href="/devtools/docs/remote-debugging.html">Learn more</a></p> - </article> - </div> - <div class="g-unit g-last"> - <article class="g-content"> - <h2>Mobile Emulation</h2> - <p>Use the Chrome DevTools Mobile Emulation features to test how your web app will work - on different devices. </p> - <p><a href="/devtools/docs/mobile-emulation.html">Learn more</a></p> - </article> - </div> - </div> - </div> - </section> - -</div> -{{/partials.site}} diff --git a/chrome/common/extensions/docs/templates/public/home/platform-pillar.html b/chrome/common/extensions/docs/templates/public/home/platform-pillar.html deleted file mode 100644 index 2a0989c..0000000 --- a/chrome/common/extensions/docs/templates/public/home/platform-pillar.html +++ /dev/null @@ -1,375 +0,0 @@ -{{+content:partials.site}} -<div class="pillar-content"> - - <h1>Chrome Platform</h1> - - <section class="article-list g-section"> - <article class="new"> - <h4 class="label">Apps</h4> - <h2>Learn Basics</h2> - <p>Develop your first Chrome App and discover - how they look, how they behave, and how they are modeled. - Launch your Apps from your native platform - using the - <a href="http://chrome.blogspot.com/2013/12/a-new-breed-of-chrome-apps-now.html">Chrome App Launcher</a>: - </p> - <p><a href="/apps/first_app.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/chrome_apps.png" alt="500px Chrome App launched from Chrome App Launcher"> - </article> - - <article> - <h4 class="label">Apps</h4> - <h2>Learn with Codelab</h2> - <p>The goal of this codelab is to get you building Chrome Apps fast. - Once you've completed this codelab, you will have a simple Todo app.</p> - <p><a href="/apps/app_codelab1_setup.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/todo_codelab.png" - width="110%" - alt="Create this simple Todo Chrome App."> - </article> - - <article> - <h4 class="label">Apps</h4> - <h2>Samples</h2> - <p>Browse official Chrome Apps samples in the - <a href="https://github.com/GoogleChrome/chrome-app-samples">chrome-apps-samples GitHub repository</a>. - The <a href="https://github.com/GoogleChrome/chrome-app-samples/blob/master/README.md">README.md</a> - lists each sample's APIs and provides a link to download in the Chrome Web Store.</p> - <img src="{{static}}/images/platform-pillar/chrome_app_samples.png" alt="Chrome apps samples maintained in GitHub repository"> - </article> - - <article> - <h4 class="label">Apps</h4> - <h2>Reference</h2> - <p>Chrome Apps have access to Chrome APIs not available to traditional web sites. - With these APIs, - you can build powerful apps that interact - with network and hardware devices, media tools, and much more. - <ul> - <li><a href="/apps/api_index.html">Chrome Platform APIs</a>: lists APIs available in each Chrome channel</li> - <li><a href="/apps/manifest.html">Manifest File Format</a>: lists supported manifest fields</li> - <li><a href="/apps/app_deprecated.html">Disabled Web Features</a>: lists disabled open web platform features</li> - </ul></p> - <p><a href="/apps/api_index.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Apps</h4> - <h2>Develop in Cloud</h2> - <p>Chrome Apps leverage the Google Cloud Platform to store and access data. - They work offline by default - and can sync back to the cloud once connectivity is restored. - Use the - <a href="/apps/syncFileSystem.html">syncFileSystem API</a> - to save and synchronize caching data in Google Drive.</p> - <p><a href="/apps/offline_apps.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/sync_file_system.png" alt="Use Google Drive to store Chrome Apps data in the cloud."> - </article> - - <article> - <h4 class="label">Apps</h4> - <h2>Network and Hardware APIs</h2> - <p> Chrome Apps can interact with low-level system services. - Using the network and hardware APIs, they can: - <ul> - <li>Act as <a href="/apps/socket.html">network clients</a> -for TCP and UDP connections.</li> - <li>Communicate with <a href="/apps/usb.html">usb devices</a>.</li> - <li>Read and write to devices connected to <a href="/apps/serial.html">serial ports</a>.</li> - <li>Connect to <a href="/apps/bluetooth.html">bluetooth devices</a>.</li> - </ul></p> - <p><a href="/apps/app_usb.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Extensions</h4> - <h2>Learn Basics</h2> - <p>Extensions are small software programs that can modify and - enhance the functionality of the Chrome browser. - Write extensions using web technologies: HTML, JavaScript, and CSS.</p> - <p><a href="/extensions/overview.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/extensions.png" alt="Browser action and page actions are common extension types."> - </article> - - <article> - <h4 class="label">Extensions</h4> - <h2>Getting Started Tutorial</h2> - <p>This tutorial walks you through the construction - of a simple browser action extension. - Clicking the browser action UI element opens a pop-up window.</p> - <p><a href="/extensions/getstarted.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/one_click_kittens.png" alt="One-click kittens tutorial"> - </article> - - <article> - <h4 class="label">Extensions</h4> - <h2>Samples</h2> - <p>Browse official Chrome Extensions samples; - each sample lists API methods and links to source files. - Filter by keyword or API:</p> - <p><a href="/extensions/samples.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/extension_samples.png" alt="Extension samples page"> - </article> - - <article> - <h4 class="label">Extensions</h4> - <h2>Reference</h2> - <p>Extensions are essentially web pages; - they can use all APIs that the browser provides to web pages. - Using Extensions APIs, they can also interact programmatically with browser features - such as bookmarks and tabs. - Read the reference docs to find out more: - <ul> - <li><a href="/extensions/whats_new.html">What's New</a>: lists what's new in stable Chrome versions</li> - <li><a href="/extensions/api_index.html">Chrome Platform APIs</a>: lists APIs available in each Chrome channel</li> - <li><a href="/extensions/manifest.html">Manifest File Format</a>: describes supported manifest fields</li> - <li><a href="/extensions/permission_warnings.html">Permissions</a>: describes permission warnings</li> - </ul> - </p> - <p><a href="/extensions/api_index.html">Learn more</a></p> - </article> - - <article class="new"> - <h4 class="label">Extensions</h4> - <h2>Distribute Extensions</h2> - <p><a href="/extensions/packaging.html">Upload your extension</a> - to test it in developer channels, - then <a href="/extensions/hosting.html">publish your extension</a> - in the Chrome Web Store. - New feature! You can now - <a href="/webstore/payments-otp">monetize your extensions</a>!</p> - <p><a href="/extensions/hosting.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/upload_extensions.png" alt="Upload extensions on chrome://extensions page."> - </article> - <article> - <h4 class="label">Extensions</h4> - <h2>Themes</h2> - <p>A theme is a special kind of extension that changes the way the browser looks. - Themes are <a href="/extensions/packaging.html">packaged</a> like regular extensions, - but they don't contain JavaScript or HTML code. - Distribute your themes in the - <a href="https://chrome.google.com/webstore/category/themes">Chrome Web Store</a>. - </p> - <p><a href="/extensions/themes.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/theme.png" alt="Grass theme"> - </article> - - <article class="new"> - <h4 class="label">Native Client</h4> - <h2>Learn Basics</h2> - <p>Native Client is a sandbox for running compiled C and C++ code in the browser. - Portable Native Client extends that technology with architecture independence, - letting developers compile their code once to run in any website and on any architecture.</p> - <p><a href="/native-client/index.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/pnacl_intro.png" alt="Watch a live recorded conversation on Native Client."> - </article> - - <article> - <h4 class="label">Native Client</h4> - <h2>Tutorial</h2> - - <p>This multi-part tutorial explains how to get started developing applications with Native Client.</p> - - <p><a href="/native-client/devguide/tutorial/tutorial-part1">Part one</a> - shows how to build and run a simple web application - using Portable Native Client (PNaCl).</p> - - <p><a href="/native-client/devguide/tutorial/tutorial-part2">Part two</a> - shows how to convert the finished PNaCl web application - to use the Native Client SDK build system and common JavaScript files. - </p> - <p><a href="/native-client/devguide/tutorial/tutorial-part1">Learn more</a></p> - </article> - - <article> - <h4 class="label">Native Client</h4> - <h2>SDK</h2> - <p>Follow these steps to download - and install the Native Client SDK: - <ol> - <li>Download the SDK update utility and unzip.</li> - <li>See which versions are available.</li> - <li>Run <code>naclsdk</code> with the “update” command - to download particular bundles that are available.</li> - </ol> - </p> - <p><a href="/native-client/sdk/download">Learn more</a></p> - </article> - - <article> - <h4 class="label">Native Client</h4> - <h2>Development Cycle</h2> - <p>End-to-end native client development workflow: - <ul> - <li><a href="/native-client/devguide/devcycle/building.html">Build</a> -Native Client modules.</li> - <li><a href="/native-client/devguide/devcycle/running.html">Run</a> -Native Client applications during development.</li> - <li><a href="/native-client/devguide/devcycle/debugging.html">Debug, monitor, and measure</a> -Native Client application performance.</li> - </ul></p> - <p><a href="/native-client/devguide/devcycle/building.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Native Client</h4> - <h2>Coding Your Application</h2> - <p>Dive deeper into Native Client development. - Learn: - <ul> - <li>How Native Client applications are - <a href="/native-client/devguide/coding/application-structure.html">structured</a></li> - <li>Which classes and functions to implement in your -<a href="/native-client/devguide/coding/native-client-modules.html">Native Client module</a> for Chrome to load, initialize, and run it</li> - <li>How to use the - <a href="/native-client/devguide/coding/message-system.html">messaging system</a> - to communicate between the JavaScript code and - the Native Client module's C or C++code</li> - </ul> - And much more!</p> - <p><a href="/native-client/devguide/coding/application-structure.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Native Client</h4> - <h2>Pepper API</h2> - <p>The Pepper API lets Native Client modules communicate - with the hosting browser and access system-level functions in a safe and portable way. - Pepper has both a - <a href="/native-client/pepperc/index.html">C API</a> and a - <a href="/native-client/peppercpp/index.html">C++ API</a>.</p> - - <p>These APIs are generally divided into two parts: - <ul><li>Functions implemented in the browser - that you call from your Native Client module</li> - <li>Functions the browser invokes so you must implement them - in your Native Client module - </li> - </ul> - </p> - <p><a href="/native-client/overview.html#pepper-plugin-api">Learn more</a></p> - </article> - - <article> - <h4 class="label">Store</h4> - <h2>What Is the Chrome Web Store?</h2> - <p>The Chrome Web Store lets you - <a href="/webstore/publish.html">publish</a> - your Chrome Apps, Extensions, and Themes - where Chrome users can easily find them.</p> - <p><a href="/webstore/index.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/chrome_web_store.png" alt="Publish apps, extensions, and themes in Chrome Web Store."> - </article> - - <article> - <h4 class="label">Store</h4> - <h2>Tutorial: Getting Started</h2> - <p>Follow these simple steps - to publish your app, extension, - or theme to the Chrome Web Store: - <ol> - <li>Create manifest file.</li> - <li>Get image assets.</li> - <li>Test app.</li> - <li>Zip app.</li> - <li>Upload your app to store.</li> - </ol> - </p> - <p><a href="/webstore/get_started_simple.html">Learn more</a></p> - </article> - - <article> - <h4 class="label">Store</h4> - <h2>Branding</h2> - <p>Follow the Chrome Web Store branding guidelines -for supplying images and promotional assets.</p> - <p><a href="/webstore/branding.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/ChromeWebStore_BadgeWBorder_v2_206x58.png" alt="Using the Chrome Web Store badge"> - </article> - - <article class="new"> - <h4 class="label">Store</h4> - <h2>Monetizing</h2> - <p>Two options for charging your users: - Chrome Web Store Payments for - <a href="/webstore/payments-otp">one-time payments</a> or - <a href="/apps/google_wallet.html">Google Wallet for Digital Goods</a> - to sell digital or virtual goods in your Chrome Apps or Extensions.</p> - <p><a href="/webstore/money.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/wallet-review.png" - width="250px" - alt="Using Google Wallet in apps and extensions"> - </article> - - <article> - <h4 class="label">Store</h4> - <h2>Publishing</h2> - <p>When your app, extension, or theme is finished (if not before), - upload it with the - <a href="https://chrome.google.com/webstore/developer/dashboard">Developer Dashboard</a>. - Uploading generates an app ID, - which you may need to complete your application code.</p> - <p><a href="/webstore/publish.html">Learn more</a></p> - <img src="{{static}}/images/platform-pillar/store_developer_dashboard.png" alt="Chrome Web Store Developer Dashboard"> - </article> - - <article> - <h4 class="label">Store</h4> - <h2>Best Practices</h2> - <p>When publishing in the store, - follow these <a href="/webstore/best_practices.html">best practices</a>: - <ul> - <li>Support Google Accounts.</li> - <li>Keep ex-user data for 30 days.</li> - <li>Cache license data.</li> - <li>Create a compelling store listing.</li> - </ul> - </p> - <p><a href="/webstore/best_practices.html">Learn more</a></p> - </article> - - </section> - -<section class="g-section g-tpl-33-67" id="further-resources"> - <h2>Further Resources</h2> - <div class="g-unit g-first"> - <article class="g-content"> - <h2 class="school">Office Hours</h2> - <p>Watch demos of the Platform and get help in Chrome Office Hours on - <a href="https://developers.google.com/live/chrome/">Google Developers Live</a>.</p> - </article> - </div> - <div class="g-unit"> - <div class="g-section g-tpl-50-50"> - <div class="g-unit g-first"> - <article class="g-content"> - <h2 class="chat">Ask Questions</h2> - <p>Ask questions and get answers on these Stack Overflow channels: - <ul> - <li><a href="http://stackoverflow.com/questions/tagged/google-chrome">google-chrome</a> - </li> - <li><a href="http://stackoverflow.com/questions/tagged/google-chrome-extension">google-chrome-extension</a></li> - <li><a href="http://stackoverflow.com/questions/tagged/google-chrome-app">google-chrome-app</a></li> - </ul> - </p> - </article> - </div> - <div class="g-unit g-last"> - <article class="g-content"> - <h2 class="puzzle">Join a Group</h2> - <p>Help us make the Chrome Platform better! - Join a Chrome Platform group: - <ul> - <li><a href="https://groups.google.com/a/chromium.org/forum/#!forum/chromium-apps">Chrome Apps</a></li> - <li><a href="https://groups.google.com/a/chromium.org/forum/#!forum/chromium-extensions">Chrome Extensions</a></li> - <li><a href="https://groups.google.com/forum/#!forum/native-client-discuss">Native Client</a></li> - </ul> - </p> - </article> - </div> - </div> - </div> - </section> - -</div> -{{/partials.site}} |