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

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

Issue 2335313003: Refactor IntentPickerBubbleView::ShowBubble() (Closed)
Patch Set: 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
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..1a622f16829dbd40cd982759628e01347e654f27 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* contents,
djacobo_ 2016/09/14 17:16:53 nit: other parts of the class refer to |web_conten
Yusuke Sato 2016/09/14 18:15:55 Done.
const std::vector<NameAndIcon>& app_info,
const ThrottleCallback& throttle_cb) {
- Browser* browser =
- chrome::FindBrowserWithWebContents(handle->GetWebContents());
+ Browser* browser = chrome::FindBrowserWithWebContents(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, contents);
delegate->set_margins(gfx::Insets());
delegate->set_parent_window(browser_view->GetNativeWindow());
views::Widget* widget =

Powered by Google App Engine
This is Rietveld 408576698