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

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: Apply review feedback. 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 60
61 NavigationThrottle::ThrottleCheckResult HandleRequest();
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
78 CloseReason previous_user_action_;
nasko 2016/07/29 16:42:55 nit: Please put a comment on what this variable is
Ben Kwa 2016/07/29 18:29:12 Done.
79
80 // This has to be the last member of the class.
77 base::WeakPtrFactory<ArcNavigationThrottle> weak_ptr_factory_; 81 base::WeakPtrFactory<ArcNavigationThrottle> weak_ptr_factory_;
78 82
79 DISALLOW_COPY_AND_ASSIGN(ArcNavigationThrottle); 83 DISALLOW_COPY_AND_ASSIGN(ArcNavigationThrottle);
80 }; 84 };
81 85
82 } // namespace arc 86 } // namespace arc
83 87
84 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_NAVIGATION_THROTTLE_H_ 88 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_NAVIGATION_THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698