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

Side by Side 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 unified diff | Download patch
OLDNEW
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_CHROMEOS_ARC_ARC_EXTERNAL_PROTOCOL_DIALOG_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_EXTERNAL_PROTOCOL_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_EXTERNAL_PROTOCOL_DIALOG_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_EXTERNAL_PROTOCOL_DIALOG_H_
7 7
8 #include <string>
9 #include <utility>
10
11 #include "components/arc/common/intent_helper.mojom.h"
12 #include "mojo/public/cpp/bindings/array.h"
8 #include "ui/base/page_transition_types.h" 13 #include "ui/base/page_transition_types.h"
9 14
10 class GURL; 15 class GURL;
11 16
12 namespace arc { 17 namespace arc {
13 18
19 enum class GetActionResult {
20 SHOW_CHROME_OS_DIALOG,
21 OPEN_URL_IN_CHROME,
22 HANDLE_URL_IN_ARC,
23 ASK_USER,
24 };
25
14 // Shows ARC version of the dialog. Returns true if ARC is supported, running, 26 // Shows ARC version of the dialog. Returns true if ARC is supported, running,
15 // and in a context where it is allowed to handle external protocol. 27 // and in a context where it is allowed to handle external protocol.
16 bool RunArcExternalProtocolDialog(const GURL& url, 28 bool RunArcExternalProtocolDialog(const GURL& url,
17 int render_process_host_id, 29 int render_process_host_id,
18 int routing_id, 30 int routing_id,
19 ui::PageTransition page_transition, 31 ui::PageTransition page_transition,
20 bool has_user_gesture); 32 bool has_user_gesture);
21 33
34 size_t GetAppIndexForTesting(
35 const mojo::Array<mojom::IntentHandlerInfoPtr>& handlers,
36 const std::string& selected_app_package);
37
38 GetActionResult GetActionForTesting(
39 const GURL& original_url,
40 const mojo::Array<mojom::IntentHandlerInfoPtr>& handlers,
41 size_t selected_app_index,
42 std::pair<GURL, std::string>* out_url_and_package);
43
22 } // namespace arc 44 } // namespace arc
23 45
24 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_EXTERNAL_PROTOCOL_DIALOG_H_ 46 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_EXTERNAL_PROTOCOL_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698