| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ |
| 6 #define CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ | 6 #define CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 const std::string& text, | 33 const std::string& text, |
| 34 const GURL& share_url, | 34 const GURL& share_url, |
| 35 const ShareCallback& callback) override; | 35 const ShareCallback& callback) override; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 FRIEND_TEST_ALL_PREFIXES(ShareServiceImplUnittest, ReplacePlaceholders); | 38 FRIEND_TEST_ALL_PREFIXES(ShareServiceImplUnittest, ReplacePlaceholders); |
| 39 | 39 |
| 40 Browser* GetBrowser(); | 40 Browser* GetBrowser(); |
| 41 | 41 |
| 42 // Returns the URL template of the target identified by |target_url| | 42 // Returns the URL template of the target identified by |target_url| |
| 43 std::string GetTargetTemplate( | 43 std::string GetTargetTemplate(const std::string& target_url, |
| 44 const std::string& target_url, | 44 const base::DictionaryValue& share_targets); |
| 45 const base::DictionaryValue& share_targets); | |
| 46 | 45 |
| 47 // Virtual for testing purposes. | 46 // Virtual for testing purposes. |
| 48 virtual PrefService* GetPrefService(); | 47 virtual PrefService* GetPrefService(); |
| 49 | 48 |
| 50 // Returns the site engagement level of the site, |url|, with the user. | 49 // Returns the site engagement level of the site, |url|, with the user. |
| 51 // Virtual for testing purposes. | 50 // Virtual for testing purposes. |
| 52 virtual blink::mojom::EngagementLevel GetEngagementLevel(const GURL& url); | 51 virtual blink::mojom::EngagementLevel GetEngagementLevel(const GURL& url); |
| 53 | 52 |
| 54 // Shows the share picker dialog with |targets| as the list of applications | 53 // Shows the share picker dialog with |targets| as the list of applications |
| 55 // presented to the user. Passes the result to |callback|. If the user picks a | 54 // presented to the user. Passes the result to |callback|. If the user picks a |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 const std::string& title, | 86 const std::string& title, |
| 88 const std::string& text, | 87 const std::string& text, |
| 89 const GURL& share_url, | 88 const GURL& share_url, |
| 90 const ShareCallback& callback, | 89 const ShareCallback& callback, |
| 91 base::Optional<std::string> result); | 90 base::Optional<std::string> result); |
| 92 | 91 |
| 93 DISALLOW_COPY_AND_ASSIGN(ShareServiceImpl); | 92 DISALLOW_COPY_AND_ASSIGN(ShareServiceImpl); |
| 94 }; | 93 }; |
| 95 | 94 |
| 96 #endif // CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ | 95 #endif // CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ |
| OLD | NEW |