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

Unified Diff: chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h

Issue 2478923002: Ensure that Chrome is visible in the dialog by default (Closed)
Patch Set: review Created 4 years, 1 month 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/intent_helper/arc_navigation_throttle.h
diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h
index 0c7cf3e80e3819f12dc9b424102db64f90af7606..1adc4333b729830b0d00f5daac6cda3900e61d2b 100644
--- a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h
+++ b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h
@@ -72,13 +72,18 @@ class ArcNavigationThrottle : public content::NavigationThrottle {
const mojo::Array<mojom::IntentHandlerInfoPtr>& handlers,
const std::string& selected_app_package);
+ // Swaps Chrome app with any app in row |kMaxAppResults-1| iff its index is
Yusuke Sato 2016/11/05 01:19:26 copied the comment from .cc as-is.
+ // bigger, thus ensuring the user can always see Chrome without scrolling.
+ // When swap is needed, fills |out_indices| and returns true. If |handlers|
+ // do not have Chrome, returns false.
+ static bool IsSwapElementsNeeded(
+ const mojo::Array<mojom::IntentHandlerInfoPtr>& handlers,
+ std::pair<size_t, size_t>* out_indices);
+
static bool IsAppAvailableForTesting(
const mojo::Array<mojom::IntentHandlerInfoPtr>& handlers);
static size_t FindPreferredAppForTesting(
const mojo::Array<mojom::IntentHandlerInfoPtr>& handlers);
- static bool IsSwapElementsNeededForTesting(
- const mojo::Array<mojom::IntentHandlerInfoPtr>& handlers,
- std::pair<size_t, size_t>* out_indices);
private:
// content::Navigation implementation:

Powered by Google App Engine
This is Rietveld 408576698