Index: chrome/common/search_provider.mojom |
diff --git a/chrome/common/search_provider.h b/chrome/common/search_provider.mojom |
similarity index 50% |
copy from chrome/common/search_provider.h |
copy to chrome/common/search_provider.mojom |
index 9b51df930e9dba2ccc28d40178900429fda229a8..b3c155d1b4957b2fa20b2f6808f493eb3439115d 100644 |
--- a/chrome/common/search_provider.h |
+++ b/chrome/common/search_provider.mojom |
@@ -1,21 +1,10 @@ |
-// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Copyright 2016 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. |
-#ifndef CHROME_COMMON_SEARCH_PROVIDER_H_ |
-#define CHROME_COMMON_SEARCH_PROVIDER_H_ |
+module chrome.mojom; |
-namespace search_provider { |
- |
-// The type of OSDD that the renderer is giving to the browser. |
-enum OSDDType { |
- // The Open Search Description URL was detected automatically. |
- AUTODETECTED_PROVIDER, |
- |
- // The Open Search Description URL was given by Javascript. |
- EXPLICIT_PROVIDER, |
- OSDD_TYPE_LAST = EXPLICIT_PROVIDER |
-}; |
+import "url/mojo/url.mojom"; |
// The install state of the search provider (not installed, installed, default). |
enum InstallState { |
@@ -33,11 +22,16 @@ enum InstallState { |
INSTALLED_BUT_NOT_DEFAULT = 1, |
// The search provider is set as the user's default. |
- INSTALLED_AS_DEFAULT = 2, |
- |
- INSTALLED_STATE_LAST = INSTALLED_AS_DEFAULT |
+ INSTALLED_AS_DEFAULT = 2 |
}; |
-} // namespace search_provider |
- |
-#endif // CHROME_COMMON_SEARCH_PROVIDER_H_ |
+interface SearchProviderInstallState { |
+ // Find out if the given url's security origin is installed as a search |
+ // provider. The |page_url| is the requesting page and the |inquiry_url| is |
+ // the search provider (e.g. www.google.com), expressed as a security origin |
+ // URL. |
+ [Sync] |
+ GetInstallState( |
+ url.mojom.Url page_url, |
+ url.mojom.Url inquiry_url) => (InstallState install); |
+}; |