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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); | 312 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); |
313 | 313 |
314 this.onthemechange = null; | 314 this.onthemechange = null; |
315 }; | 315 }; |
316 | 316 |
317 // Export legacy searchbox API. | 317 // Export legacy searchbox API. |
318 // TODO: Remove this when Instant Extended is fully launched. | 318 // TODO: Remove this when Instant Extended is fully launched. |
319 chrome.searchBox = chrome.embeddedSearch.searchBox; | 319 chrome.searchBox = chrome.embeddedSearch.searchBox; |
320 } | 320 } |
OLD | NEW |