Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <!-- | 2 <!-- |
| 3 -- Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 -- Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 -- Use of this source code is governed by a BSD-style license that can be | 4 -- Use of this source code is governed by a BSD-style license that can be |
| 5 -- found in the LICENSE file. | 5 -- found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <html> | 7 <html> |
| 8 <head> | 8 <head> |
| 9 <if expr="0"> | 9 <if expr="0"> |
| 10 <!-- <if ... /if> is removed while flattening HTML. --> | 10 <!-- <if ... /if> is removed while flattening HTML. --> |
| 11 <base href=""> | |
| 11 <script> | 12 <script> |
| 12 // Instruction for enabling loading file manager files remotely (speeds up | 13 // Instruction for enabling loading file manager files remotely (speeds up |
| 13 // development cycle): | 14 // development cycle): |
| 14 // | 15 // |
| 15 // 1. Find the IDR_FILE_MANAGER_MAIN resource in | 16 // 1. Find the IDR_FILE_MANAGER_MAIN resource in |
| 16 // chrome/browser/resources/component_extension_resources.grd. | 17 // chrome/browser/resources/component_extension_resources.grd. |
| 17 // Change the "flattenhtml" attribute to false. | 18 // Change the "flattenhtml" attribute to false. |
| 18 // | 19 // |
| 19 // 2. Build and run the Chromium OS. | 20 // 2. Build and run the Chromium OS. |
| 20 // | 21 // |
| 21 // 3. Make source files available via the HTTP protocol: | 22 // 3. Make source files available via the HTTP protocol: |
| 22 // twistd web --path chrome/browser/resources/ --port 1080 | 23 // twistd web --path chrome/browser/resources/ --port 1080 |
| 23 // | 24 // |
| 24 // 4. Open the File Manager. Execute the following JS code in its context | 25 // 4. Open the File Manager. Execute the following JS code in its context |
| 25 // using DevTools: | 26 // using DevTools: |
| 26 // localStorage['base'] = 'http://youmachine:1080/file_manager/' | 27 // localStorage.base = 'http://yourmachine:1080/file_manager/' |
| 27 // | 28 // |
| 28 // This will make the File Manager use fresh JS and CSS files from the | 29 // This will make the File Manager use fresh JS and CSS files from the |
| 29 // development machine. HTML files and JS files for WebWorkers would still | 30 // development machine. HTML files and JS files for WebWorkers would still |
| 30 // need a rebuild to update. | 31 // need a rebuild to update. |
| 31 | 32 |
| 32 if (localStorage['base']) { | 33 document.getElementsByTagName('base')[0].setAttribute('href', |
|
Vladislav Kaznacheev
2011/11/29 19:11:59
document.querySelector('base') is cleaner
SeRya
2011/11/30 13:04:04
Fixed. Thanks.
| |
| 33 var base = document.createElement('base'); | 34 localStorage.base); |
| 34 base.setAttribute('href', localStorage['base']); | |
| 35 document.head.appendChild(base); | |
| 36 } | |
| 37 </script> | 35 </script> |
| 38 </if> | 36 </if> |
| 39 <!-- metrics.js initiates load performance tracking | 37 <!-- metrics.js initiates load performance tracking |
| 40 so we want to parse it as early as possible --> | 38 so we want to parse it as early as possible --> |
| 41 <script src="js/metrics.js"></script> | 39 <script src="js/metrics.js"></script> |
| 42 <script> | 40 <script> |
| 43 (function() { | 41 (function() { |
| 44 // Switch to 'test harness' mode when loading from a file or http url. | 42 // Switch to 'test harness' mode when loading from a file or http url. |
| 45 var isHarness = document.location.protocol == 'file:' || | 43 var isHarness = document.location.protocol == 'file:' || |
| 46 document.location.protocol == 'http:'; | 44 document.location.protocol == 'http:'; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 visibleif='this.dialogType_ == "saveas-file"'> | 175 visibleif='this.dialogType_ == "saveas-file"'> |
| 178 <div class=horizontal-spacer></div> | 176 <div class=horizontal-spacer></div> |
| 179 <button class=ok disabled tabindex=2>[OK]</button> | 177 <button class=ok disabled tabindex=2>[OK]</button> |
| 180 <button class=cancel tabindex=3 i18n-content=CANCEL_LABEL | 178 <button class=cancel tabindex=3 i18n-content=CANCEL_LABEL |
| 181 >[CANCEL]</button> | 179 >[CANCEL]</button> |
| 182 </div> | 180 </div> |
| 183 | 181 |
| 184 <script>init();</script> | 182 <script>init();</script> |
| 185 </body> | 183 </body> |
| 186 </html> | 184 </html> |
| OLD | NEW |