OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * Allows for binding callbacks to a specific scope. | 6 * Allows for binding callbacks to a specific scope. |
7 * @param {Object} scope Scope to bind to. | 7 * @param {Object} scope Scope to bind to. |
8 * @returns {Function} A wrapped call to this function. | 8 * @returns {Function} A wrapped call to this function. |
9 */ | 9 */ |
10 Function.prototype.bind = function(scope) { | 10 Function.prototype.bind = function(scope) { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 | 141 |
142 ////////////////////////////////////////////////////////////////////////// | 142 ////////////////////////////////////////////////////////////////////////// |
143 | 143 |
144 /** | 144 /** |
145 * Provides an interface to the Chrome Extensions documentation site. | 145 * Provides an interface to the Chrome Extensions documentation site. |
146 * @param {APISearchCorpus} corpus The search corpus to populate. | 146 * @param {APISearchCorpus} corpus The search corpus to populate. |
147 * @constructor | 147 * @constructor |
148 */ | 148 */ |
149 function DocsManager(corpus) { | 149 function DocsManager(corpus) { |
150 this.CODE_URL_PREFIX = 'http://code.google.com/chrome/extensions/'; | 150 this.CODE_URL_PREFIX = 'http://code.google.com/chrome/extensions/'; |
151 // TODO(koz): Read the whole api, not just the parts that haven't been | |
152 // migrated out of extension_api.json. | |
Aaron Boodman
2011/12/07 23:30:35
I think that you should fix this before landing.
koz (OOO until 15th September)
2011/12/09 19:24:18
Okay.
| |
151 this.API_MANIFEST_URL = [ | 153 this.API_MANIFEST_URL = [ |
152 'https://src.chromium.org/viewvc/chrome/trunk/src/', | 154 'https://src.chromium.org/viewvc/chrome/trunk/src/', |
153 'chrome/common/extensions/api/extension_api.json' | 155 'chrome/common/extensions/api/extension_api.json' |
154 ].join(''); | 156 ].join(''); |
155 this.corpus_ = corpus; | 157 this.corpus_ = corpus; |
156 }; | 158 }; |
157 | 159 |
158 /** | 160 /** |
159 * Initiates a fetch of the docs and populates the corpus. | 161 * Initiates a fetch of the docs and populates the corpus. |
160 */ | 162 */ |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
405 } | 407 } |
406 }; | 408 }; |
407 | 409 |
408 ////////////////////////////////////////////////////////////////////////// | 410 ////////////////////////////////////////////////////////////////////////// |
409 | 411 |
410 var corpus = new APISearchCorpus(); | 412 var corpus = new APISearchCorpus(); |
411 var docsManager = new DocsManager(corpus); | 413 var docsManager = new DocsManager(corpus); |
412 docsManager.fetch(); | 414 docsManager.fetch(); |
413 var tabManager = new TabManager(); | 415 var tabManager = new TabManager(); |
414 var omnibox = new OmniboxManager(corpus, tabManager); | 416 var omnibox = new OmniboxManager(corpus, tabManager); |
OLD | NEW |