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

Side by Side Diff: chrome/browser/chromeos/arc/arc_navigation_throttle.h

Issue 2194523002: [arc-intents] Handle redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_NAVIGATION_THROTTLE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_NAVIGATION_THROTTLE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_NAVIGATION_THROTTLE_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_NAVIGATION_THROTTLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const base::Callback<void(size_t, CloseReason)>& cb)>; 50 const base::Callback<void(size_t, CloseReason)>& cb)>;
51 ArcNavigationThrottle( 51 ArcNavigationThrottle(
52 content::NavigationHandle* navigation_handle, 52 content::NavigationHandle* navigation_handle,
53 const ShowDisambigDialogCallback& show_disambig_dialog_cb); 53 const ShowDisambigDialogCallback& show_disambig_dialog_cb);
54 ~ArcNavigationThrottle() override; 54 ~ArcNavigationThrottle() override;
55 55
56 private: 56 private:
57 // content::Navigation implementation: 57 // content::Navigation implementation:
58 NavigationThrottle::ThrottleCheckResult WillStartRequest() override; 58 NavigationThrottle::ThrottleCheckResult WillStartRequest() override;
59 NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override; 59 NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override;
60 NavigationThrottle::ThrottleCheckResult HandleRequest();
djacobo_ 2016/07/28 20:08:01 nit: As HandleRequest() is not an override of cont
Ben Kwa 2016/07/28 21:33:12 Done.
60 61
61 void OnAppCandidatesReceived(mojo::Array<mojom::UrlHandlerInfoPtr> handlers); 62 void OnAppCandidatesReceived(mojo::Array<mojom::UrlHandlerInfoPtr> handlers);
62 void OnAppIconsReceived( 63 void OnAppIconsReceived(
63 mojo::Array<mojom::UrlHandlerInfoPtr> handlers, 64 mojo::Array<mojom::UrlHandlerInfoPtr> handlers,
64 std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons); 65 std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons);
65 void OnDisambigDialogClosed(mojo::Array<mojom::UrlHandlerInfoPtr> handlers, 66 void OnDisambigDialogClosed(mojo::Array<mojom::UrlHandlerInfoPtr> handlers,
66 size_t selected_app_index, 67 size_t selected_app_index,
67 CloseReason close_reason); 68 CloseReason close_reason);
68 // Compares the host name of the referrer and target URL to decide whether 69 // Compares the host name of the referrer and target URL to decide whether
69 // the navigation needs to be overriden. 70 // the navigation needs to be overriden.
70 bool ShouldOverrideUrlLoading(content::NavigationHandle* navigation_handle); 71 bool ShouldOverrideUrlLoading(content::NavigationHandle* navigation_handle);
71 72
72 // A callback object that allow us to display an IntentPicker when Run() is 73 // A callback object that allow us to display an IntentPicker when Run() is
73 // executed, it also allow us to report the user's selection back to 74 // executed, it also allow us to report the user's selection back to
74 // OnDisambigDialogClosed(). 75 // OnDisambigDialogClosed().
75 ShowDisambigDialogCallback show_disambig_dialog_callback_; 76 ShowDisambigDialogCallback show_disambig_dialog_callback_;
76 77
77 base::WeakPtrFactory<ArcNavigationThrottle> weak_ptr_factory_; 78 base::WeakPtrFactory<ArcNavigationThrottle> weak_ptr_factory_;
78 79
80 CloseReason previous_user_action_;
djacobo_ 2016/07/28 20:08:01 Put this before weak_ptr_factory_, builders are co
Luis Héctor Chávez 2016/07/28 20:12:14 While we're on it, please add a comment to |weak_p
Ben Kwa 2016/07/28 21:33:13 Done.
Ben Kwa 2016/07/28 21:33:13 Done.
81
79 DISALLOW_COPY_AND_ASSIGN(ArcNavigationThrottle); 82 DISALLOW_COPY_AND_ASSIGN(ArcNavigationThrottle);
80 }; 83 };
81 84
82 } // namespace arc 85 } // namespace arc
83 86
84 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_NAVIGATION_THROTTLE_H_ 87 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_NAVIGATION_THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698