Chromium Code Reviews| 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 | 8 |
| 9 if (!chrome.embeddedSearch) { | 9 if (!chrome.embeddedSearch) { |
| 10 chrome.embeddedSearch = new function() { | 10 chrome.embeddedSearch = new function() { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 //TODO(jered): Remove this empty method when google no longer requires it. | 74 //TODO(jered): Remove this empty method when google no longer requires it. |
| 75 this.setRestrictedValue = function() {}; | 75 this.setRestrictedValue = function() {}; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 this.newTabPage = new function() { | 78 this.newTabPage = new function() { |
| 79 | 79 |
| 80 // ======================================================================= | 80 // ======================================================================= |
| 81 // Private functions | 81 // Private functions |
| 82 // ======================================================================= | 82 // ======================================================================= |
| 83 native function CheckIsUserSignedInToChromeAs(); | 83 native function CheckIsUserSignedInToChromeAs(); |
| 84 native function CheckUserSyncHistory(); | |
| 84 native function DeleteMostVisitedItem(); | 85 native function DeleteMostVisitedItem(); |
| 85 native function GetAppLauncherEnabled(); | 86 native function GetAppLauncherEnabled(); |
| 86 native function GetDispositionFromClick(); | 87 native function GetDispositionFromClick(); |
| 87 native function GetMostVisitedItems(); | 88 native function GetMostVisitedItems(); |
| 88 native function GetThemeBackgroundInfo(); | 89 native function GetThemeBackgroundInfo(); |
| 89 native function IsInputInProgress(); | 90 native function IsInputInProgress(); |
| 90 native function LogEvent(); | 91 native function LogEvent(); |
| 91 native function LogMostVisitedImpression(); | 92 native function LogMostVisitedImpression(); |
| 92 native function LogMostVisitedNavigation(); | 93 native function LogMostVisitedNavigation(); |
| 93 native function NavigateContentWindow(); | 94 native function NavigateContentWindow(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 alt_key, | 137 alt_key, |
| 137 ctrl_key, | 138 ctrl_key, |
| 138 meta_key, | 139 meta_key, |
| 139 shift_key); | 140 shift_key); |
| 140 }; | 141 }; |
| 141 | 142 |
| 142 this.checkIsUserSignedIntoChromeAs = function(identity) { | 143 this.checkIsUserSignedIntoChromeAs = function(identity) { |
| 143 CheckIsUserSignedInToChromeAs(identity); | 144 CheckIsUserSignedInToChromeAs(identity); |
| 144 }; | 145 }; |
| 145 | 146 |
| 147 this.checkUserSyncHistory = function() { | |
| 148 CheckUserSyncHistory(); | |
| 149 }; | |
| 150 | |
| 146 // This method is restricted to chrome-search://most-visited pages by | 151 // This method is restricted to chrome-search://most-visited pages by |
| 147 // checking the invoking context's origin in searchbox_extension.cc. | 152 // checking the invoking context's origin in searchbox_extension.cc. |
| 148 this.logEvent = function(histogram_name) { | 153 this.logEvent = function(histogram_name) { |
| 149 LogEvent(histogram_name); | 154 LogEvent(histogram_name); |
| 150 }; | 155 }; |
| 151 | 156 |
| 152 // This method is restricted to chrome-search://most-visited pages by | 157 // This method is restricted to chrome-search://most-visited pages by |
| 153 // checking the invoking context's origin in searchbox_extension.cc. | 158 // checking the invoking context's origin in searchbox_extension.cc. |
| 154 this.logMostVisitedImpression = function(position, provider) { | 159 this.logMostVisitedImpression = function(position, provider) { |
| 155 LogMostVisitedImpression(position, provider); | 160 LogMostVisitedImpression(position, provider); |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 167 | 172 |
| 168 this.undoAllMostVisitedDeletions = function() { | 173 this.undoAllMostVisitedDeletions = function() { |
| 169 UndoAllMostVisitedDeletions(); | 174 UndoAllMostVisitedDeletions(); |
| 170 }; | 175 }; |
| 171 | 176 |
| 172 this.undoMostVisitedDeletion = function(restrictedId) { | 177 this.undoMostVisitedDeletion = function(restrictedId) { |
| 173 UndoMostVisitedDeletion(restrictedId); | 178 UndoMostVisitedDeletion(restrictedId); |
| 174 }; | 179 }; |
| 175 | 180 |
| 176 this.onsignedincheckdone = null; | 181 this.onsignedincheckdone = null; |
| 182 this.onusersynchistorydone = null; | |
|
Mathieu
2014/11/05 13:38:42
onsynchistorycheckdone
beaudoin
2014/11/05 21:28:21
Used onhistorysynccheckdone for consistency.
| |
| 177 this.oninputcancel = null; | 183 this.oninputcancel = null; |
| 178 this.oninputstart = null; | 184 this.oninputstart = null; |
| 179 this.onmostvisitedchange = null; | 185 this.onmostvisitedchange = null; |
| 180 this.onthemechange = null; | 186 this.onthemechange = null; |
| 181 }; | 187 }; |
| 182 | 188 |
| 183 // TODO(jered): Remove when google no longer expects this object. | 189 // TODO(jered): Remove when google no longer expects this object. |
| 184 chrome.searchBox = this.searchBox; | 190 chrome.searchBox = this.searchBox; |
| 185 }; | 191 }; |
| 186 } | 192 } |
| OLD | NEW |