| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 from data_source_registry import CreateDataSources | 5 from data_source_registry import CreateDataSources |
| 6 from third_party.handlebar import Handlebar | 6 from third_party.handlebar import Handlebar |
| 7 from url_constants import GITHUB_BASE, EXTENSIONS_SAMPLES | 7 from url_constants import GITHUB_BASE, EXTENSIONS_SAMPLES |
| 8 | 8 |
| 9 | 9 |
| 10 class TemplateRenderer(object): | 10 class TemplateRenderer(object): |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 }) | 44 }) |
| 45 if additional_context: | 45 if additional_context: |
| 46 render_context.update(additional_context) | 46 render_context.update(additional_context) |
| 47 render_data = template.Render(render_context) | 47 render_data = template.Render(render_context) |
| 48 return render_data.text, render_data.errors | 48 return render_data.text, render_data.errors |
| 49 | 49 |
| 50 def _CreateDataSources(self, request): | 50 def _CreateDataSources(self, request): |
| 51 server_instance = self._server_instance | 51 server_instance = self._server_instance |
| 52 data_sources = CreateDataSources(server_instance, request=request) | 52 data_sources = CreateDataSources(server_instance, request=request) |
| 53 data_sources.update({ | 53 data_sources.update({ |
| 54 'apis': server_instance.api_data_source_factory.Create(request), | |
| 55 'samples': server_instance.samples_data_source_factory.Create(request), | 54 'samples': server_instance.samples_data_source_factory.Create(request), |
| 56 }) | 55 }) |
| 57 return data_sources | 56 return data_sources |
| OLD | NEW |