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

Unified Diff: chrome/browser/ui/views/intent_picker_bubble_view.cc

Issue 2335313003: Refactor IntentPickerBubbleView::ShowBubble() (Closed)
Patch Set: Address comments Created 4 years, 3 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
« no previous file with comments | « chrome/browser/ui/views/intent_picker_bubble_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/intent_picker_bubble_view.cc
diff --git a/chrome/browser/ui/views/intent_picker_bubble_view.cc b/chrome/browser/ui/views/intent_picker_bubble_view.cc
index 0d46d817d4822b33e4f3f64474e5f87bd3a8bc7d..0be935dad8bf46596ba2651e2c661fa333bf26d3 100644
--- a/chrome/browser/ui/views/intent_picker_bubble_view.cc
+++ b/chrome/browser/ui/views/intent_picker_bubble_view.cc
@@ -50,11 +50,10 @@ enum class Option : int { ALWAYS = -2, JUST_ONCE };
// static
void IntentPickerBubbleView::ShowBubble(
- content::NavigationHandle* handle,
+ content::WebContents* web_contents,
const std::vector<NameAndIcon>& app_info,
const ThrottleCallback& throttle_cb) {
- Browser* browser =
- chrome::FindBrowserWithWebContents(handle->GetWebContents());
+ Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
if (!browser) {
throttle_cb.Run(kAppTagNoneSelected,
arc::ArcNavigationThrottle::CloseReason::ERROR);
@@ -67,8 +66,8 @@ void IntentPickerBubbleView::ShowBubble(
return;
}
- IntentPickerBubbleView* delegate = new IntentPickerBubbleView(
- app_info, throttle_cb, handle->GetWebContents());
+ IntentPickerBubbleView* delegate =
+ new IntentPickerBubbleView(app_info, throttle_cb, web_contents);
delegate->set_margins(gfx::Insets());
delegate->set_parent_window(browser_view->GetNativeWindow());
views::Widget* widget =
« no previous file with comments | « chrome/browser/ui/views/intent_picker_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698