| OLD | NEW |
| 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 <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 NavigationThrottle::ThrottleCheckResult WillStartRequest() override; | 53 NavigationThrottle::ThrottleCheckResult WillStartRequest() override; |
| 54 NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override; | 54 NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override; |
| 55 | 55 |
| 56 void OnAppCandidatesReceived(mojo::Array<mojom::UrlHandlerInfoPtr> handlers); | 56 void OnAppCandidatesReceived(mojo::Array<mojom::UrlHandlerInfoPtr> handlers); |
| 57 void OnAppIconsReceived( | 57 void OnAppIconsReceived( |
| 58 mojo::Array<mojom::UrlHandlerInfoPtr> handlers, | 58 mojo::Array<mojom::UrlHandlerInfoPtr> handlers, |
| 59 std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons); | 59 std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons); |
| 60 void OnDisambigDialogClosed(mojo::Array<mojom::UrlHandlerInfoPtr> handlers, | 60 void OnDisambigDialogClosed(mojo::Array<mojom::UrlHandlerInfoPtr> handlers, |
| 61 size_t selected_app_index, | 61 size_t selected_app_index, |
| 62 CloseReason close_reason); | 62 CloseReason close_reason); |
| 63 // Compares the host name of the referrer and target URL to decide whether |
| 64 // the navigation needs to be overriden. |
| 65 bool ShouldOverrideUrlLoading(content::NavigationHandle* navigation_handle); |
| 63 | 66 |
| 64 // A callback object that allow us to display an IntentPicker when Run() is | 67 // A callback object that allow us to display an IntentPicker when Run() is |
| 65 // executed, it also allow us to report the user's selection back to | 68 // executed, it also allow us to report the user's selection back to |
| 66 // OnDisambigDialogClosed(). | 69 // OnDisambigDialogClosed(). |
| 67 ShowDisambigDialogCallback show_disambig_dialog_callback_; | 70 ShowDisambigDialogCallback show_disambig_dialog_callback_; |
| 68 | 71 |
| 69 base::WeakPtrFactory<ArcNavigationThrottle> weak_ptr_factory_; | 72 base::WeakPtrFactory<ArcNavigationThrottle> weak_ptr_factory_; |
| 70 | 73 |
| 71 DISALLOW_COPY_AND_ASSIGN(ArcNavigationThrottle); | 74 DISALLOW_COPY_AND_ASSIGN(ArcNavigationThrottle); |
| 72 }; | 75 }; |
| 73 | 76 |
| 74 } // namespace arc | 77 } // namespace arc |
| 75 | 78 |
| 76 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_NAVIGATION_THROTTLE_H_ | 79 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_NAVIGATION_THROTTLE_H_ |
| OLD | NEW |