Chromium Code Reviews| Index: chrome/browser/webshare/share_service_impl.h |
| diff --git a/chrome/browser/webshare/share_service_impl.h b/chrome/browser/webshare/share_service_impl.h |
| index 0a3cecf656830184fd1a447ae93483386ee5f694..663485a9ffd3d598839b95d39c86c87fb7e1761d 100644 |
| --- a/chrome/browser/webshare/share_service_impl.h |
| +++ b/chrome/browser/webshare/share_service_impl.h |
| @@ -6,11 +6,15 @@ |
| #define CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ |
| #include <string> |
| +#include <vector> |
| #include "base/gtest_prod_util.h" |
| #include "base/strings/string16.h" |
| +#include "chrome/browser/ui/browser.h" |
| +#include "chrome/browser/ui/browser_dialogs.h" |
| #include "mojo/public/cpp/bindings/interface_request.h" |
| #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" |
| +#include "third_party/WebKit/public/platform/site_engagement.mojom.h" |
| class GURL; |
| @@ -31,6 +35,13 @@ class ShareServiceImpl : public blink::mojom::ShareService { |
| private: |
| FRIEND_TEST_ALL_PREFIXES(ShareServiceImplUnittest, ReplacePlaceholders); |
| + Browser* GetBrowser(); |
| + std::string GetTargetTemplate(std::string target_url); |
|
Matt Giuca
2017/02/01 07:30:20
const std::string&
(Generally, all non-primitive
constantina
2017/02/02 00:43:48
Done. I know, but I keep forgetting to do it, beca
Matt Giuca
2017/02/02 02:57:10
Yep, that's fine. It's quite unintuitive.
|
| + // Virtual for testing purposes. |
| + virtual PrefService* GetPrefService(); |
| + // Virtual for testing purposes. |
| + virtual blink::mojom::EngagementLevel GetEngagementLevel(GURL url); |
|
Matt Giuca
2017/02/01 07:30:20
const GURL&
constantina
2017/02/02 00:43:48
Done.
|
| + |
| // Shows the share picker dialog with |targets| as the list of applications |
| // presented to the user. Passes the result to |callback|. If the user picks a |
| // target, the result passed to |callback| is the manifest URL of the chosen |
| @@ -43,6 +54,10 @@ class ShareServiceImpl : public blink::mojom::ShareService { |
| // Virtual for testing purposes. |
| virtual void OpenTargetURL(const GURL& target_url); |
| + // Returns all stored Share Targets that have a high enough engagement score |
| + // with the user. |
| + std::vector<std::string> GetTargetsWithSufficientEngagement(); |
| + |
| // Writes to |url_template_filled|, a copy of |url_template| with all |
| // instances of "{title}", "{text}", and "{url}" replaced with |
| // |title|, |text|, and |url| respectively. |