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

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

Issue 2433733002: Revert "Reusing Ok/Cancel buttons for intent picker" (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/arc_navigation_throttle.h
diff --git a/chrome/browser/chromeos/arc/arc_navigation_throttle.h b/chrome/browser/chromeos/arc/arc_navigation_throttle.h
index 18be29a51e610dde611914d4536bbae3b2aa11d1..188cadfecd4fe717ef3d14c2e23b4f00635f210a 100644
--- a/chrome/browser/chromeos/arc/arc_navigation_throttle.h
+++ b/chrome/browser/chromeos/arc/arc_navigation_throttle.h
@@ -47,18 +47,11 @@ class ArcNavigationThrottle : public content::NavigationThrottle {
// ScrollView.
enum { kMaxAppResults = 3 };
- struct AppInfo {
- explicit AppInfo(gfx::Image img, std::string package, std::string activity)
- : icon(img), package_name(package), activity_name(activity) {}
- gfx::Image icon;
- std::string package_name;
- std::string activity_name;
- };
-
- using ShowIntentPickerCallback = base::Callback<void(
- content::WebContents* web_contents,
- const std::vector<AppInfo>& app_info,
- const base::Callback<void(std::string, CloseReason)>& cb)>;
+ using NameAndIcon = std::pair<std::string, gfx::Image>;
+ using ShowIntentPickerCallback =
+ base::Callback<void(content::WebContents* web_contents,
+ const std::vector<NameAndIcon>& app_info,
+ const base::Callback<void(size_t, CloseReason)>& cb)>;
ArcNavigationThrottle(content::NavigationHandle* navigation_handle,
const ShowIntentPickerCallback& show_intent_picker_cb);
~ArcNavigationThrottle() override;
@@ -78,7 +71,7 @@ class ArcNavigationThrottle : public content::NavigationThrottle {
mojo::Array<mojom::IntentHandlerInfoPtr> handlers,
std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons);
void OnIntentPickerClosed(mojo::Array<mojom::IntentHandlerInfoPtr> handlers,
- std::string selected_app_package,
+ size_t selected_app_index,
CloseReason close_reason);
// A callback object that allow us to display an IntentPicker when Run() is
// executed, it also allow us to report the user's selection back to
« no previous file with comments | « chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc ('k') | chrome/browser/chromeos/arc/arc_navigation_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698