| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 var chrome; | 5 var chrome; |
| 6 if (!chrome) | 6 if (!chrome) |
| 7 chrome = {}; | 7 chrome = {}; |
| 8 if (!chrome.embeddedSearch) { | 8 if (!chrome.embeddedSearch) { |
| 9 chrome.embeddedSearch = new function() { | 9 chrome.embeddedSearch = new function() { |
| 10 native function NavigateContentWindow(); | 10 native function NavigateContentWindow(); |
| 11 | 11 |
| 12 this.navigateContentWindow = function(destination) { | 12 this.navigateContentWindow = function(destination, disposition) { |
| 13 return NavigateContentWindow(destination); | 13 return NavigateContentWindow(destination, disposition); |
| 14 }; | 14 }; |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 chrome.embeddedSearch.searchBox = new function() { | 17 chrome.embeddedSearch.searchBox = new function() { |
| 18 var safeObjects = {}; | 18 var safeObjects = {}; |
| 19 chrome.embeddedSearchOnWindowReady = function() { | 19 chrome.embeddedSearchOnWindowReady = function() { |
| 20 // |embeddedSearchOnWindowReady| is used for initializing window context | 20 // |embeddedSearchOnWindowReady| is used for initializing window context |
| 21 // and should be called only once per context. | 21 // and should be called only once per context. |
| 22 safeObjects.createShadowRoot = Element.prototype.webkitCreateShadowRoot; | 22 safeObjects.createShadowRoot = Element.prototype.webkitCreateShadowRoot; |
| 23 safeObjects.defineProperty = Object.defineProperty; | 23 safeObjects.defineProperty = Object.defineProperty; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); | 272 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); |
| 273 | 273 |
| 274 this.onthemechange = null; | 274 this.onthemechange = null; |
| 275 }; | 275 }; |
| 276 | 276 |
| 277 // Export legacy searchbox API. | 277 // Export legacy searchbox API. |
| 278 // TODO: Remove this when Instant Extended is fully launched. | 278 // TODO: Remove this when Instant Extended is fully launched. |
| 279 chrome.searchBox = chrome.embeddedSearch.searchBox; | 279 chrome.searchBox = chrome.embeddedSearch.searchBox; |
| 280 } | 280 } |
| OLD | NEW |