Chromium Code Reviews| Index: chrome/common/extensions/api/search_engines_private.idl |
| diff --git a/chrome/common/extensions/api/search_engines_private.idl b/chrome/common/extensions/api/search_engines_private.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4cb33fd62c74f503bd5e978b93b859394c888e7e |
| --- /dev/null |
| +++ b/chrome/common/extensions/api/search_engines_private.idl |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Use the <code>chrome.searchEnginesPrivate</code> API to get or set preferences |
| +// from the settings UI. |
| +namespace searchEnginesPrivate { |
| + |
| + dictionary SearchEngine { |
| + // The unique ID of the engine in the list. |
| + DOMString guid; |
| + |
| + // The name of the engine. |
| + DOMString name; |
| + |
| + // Whether the engine is default. |
| + boolean isDefault; |
| + }; |
| + |
| + callback SearchEnginesCallback = void (SearchEngine[] engines); |
| + |
| + interface Functions { |
| + // Gets an array of all the search engines. |
| + static void getDefaultSearchEngines(SearchEnginesCallback callback); |
|
Jeremy Klein
2015/04/22 17:37:46
nit: It seems weird to have the word "Default" in
Oren Blasberg
2015/04/22 17:41:22
In the future there will also be "custom" / "other
Oren Blasberg
2015/04/22 19:04:17
Done.
|
| + |
| + // Sets the default search engine. |
| + static void setDefaultSearchEngine(DOMString guid); |
| + }; |
| + |
| + interface Events { |
| + // Fires when the list of engines or the default engine changes. |
| + static void onSearchEnginesChanged(SearchEngine[] engines); |
| + }; |
| +}; |