Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1716)

Unified Diff: chrome/browser/webshare/share_service_impl.h

Issue 2644793006: Add picker view for Web Share Target. (Closed)
Patch Set: Fix unit tests and add cancellation test (adds virtual method to Impl class). Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 8bd381f7c97df971ee70604a7804d264e6aad7ef..b343d200ba5e7b5cd9c05cb2655cb4e8744fbaea 100644
--- a/chrome/browser/webshare/share_service_impl.h
+++ b/chrome/browser/webshare/share_service_impl.h
@@ -8,6 +8,8 @@
#include <string>
#include "base/gtest_prod_util.h"
+#include "base/strings/string16.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"
@@ -30,6 +32,13 @@ class ShareServiceImpl : public blink::mojom::ShareService {
private:
FRIEND_TEST_ALL_PREFIXES(ShareServiceImplUnittest, ReplacePlaceholders);
+ // Shows the share picker dialog with |targets| as the list of applications
+ // presented to the user. Passes the result to |callback|. Virtual for
+ // testing.
+ virtual void ShowPickerDialog(
+ const std::vector<base::string16>& targets,
+ const base::Callback<void(chrome::SharePickerResult)>& callback);
+
// Opens a new tab and navigates to |target_url|.
// Virtual for testing purposes.
virtual void OpenTargetURL(const GURL& target_url);
@@ -48,6 +57,12 @@ class ShareServiceImpl : public blink::mojom::ShareService {
const GURL& share_url,
std::string* url_template_filled);
+ void OnPickerClosed(const std::string& title,
+ const std::string& text,
+ const GURL& share_url,
+ const ShareCallback& callback,
+ chrome::SharePickerResult result);
+
DISALLOW_COPY_AND_ASSIGN(ShareServiceImpl);
};

Powered by Google App Engine
This is Rietveld 408576698