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

Unified Diff: chrome/browser/chromeos/arc/arc_external_protocol_dialog.h

Issue 2432013002: Improve intent: URI handling (Closed)
Patch Set: review Created 4 years, 2 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/chromeos/arc/arc_external_protocol_dialog.h
diff --git a/chrome/browser/chromeos/arc/arc_external_protocol_dialog.h b/chrome/browser/chromeos/arc/arc_external_protocol_dialog.h
index e2134903e774c03102dbe9c9bb05bfe16f60e7b3..2d18eb8040d5b75d6cbcc1d3cba2db8d54b6c0d0 100644
--- a/chrome/browser/chromeos/arc/arc_external_protocol_dialog.h
+++ b/chrome/browser/chromeos/arc/arc_external_protocol_dialog.h
@@ -5,12 +5,24 @@
#ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_EXTERNAL_PROTOCOL_DIALOG_H_
#define CHROME_BROWSER_CHROMEOS_ARC_ARC_EXTERNAL_PROTOCOL_DIALOG_H_
+#include <string>
+#include <utility>
+
+#include "components/arc/common/intent_helper.mojom.h"
+#include "mojo/public/cpp/bindings/array.h"
#include "ui/base/page_transition_types.h"
class GURL;
namespace arc {
+enum class GetActionResult {
+ SHOW_CHROME_OS_DIALOG,
+ OPEN_URL_IN_CHROME,
+ HANDLE_URL_IN_ARC,
+ ASK_USER,
+};
+
// Shows ARC version of the dialog. Returns true if ARC is supported, running,
// and in a context where it is allowed to handle external protocol.
bool RunArcExternalProtocolDialog(const GURL& url,
@@ -19,6 +31,16 @@ bool RunArcExternalProtocolDialog(const GURL& url,
ui::PageTransition page_transition,
bool has_user_gesture);
+size_t GetAppIndexForTesting(
+ const mojo::Array<mojom::IntentHandlerInfoPtr>& handlers,
+ const std::string& selected_app_package);
+
+GetActionResult GetActionForTesting(
+ const GURL& original_url,
+ const mojo::Array<mojom::IntentHandlerInfoPtr>& handlers,
+ size_t selected_app_index,
+ std::pair<GURL, std::string>* out_url_and_package);
+
} // namespace arc
#endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_EXTERNAL_PROTOCOL_DIALOG_H_

Powered by Google App Engine
This is Rietveld 408576698