Chromium Code Reviews| Index: chrome/browser/chromeos/arc/arc_navigation_throttle.cc |
| diff --git a/chrome/browser/chromeos/arc/arc_navigation_throttle.cc b/chrome/browser/chromeos/arc/arc_navigation_throttle.cc |
| index 3a5647a60c3d78aa7ac93afec0181a80e660d845..e3a626bd39cdf86095bd7fa89435ed5ac01cfe13 100644 |
| --- a/chrome/browser/chromeos/arc/arc_navigation_throttle.cc |
| +++ b/chrome/browser/chromeos/arc/arc_navigation_throttle.cc |
| @@ -15,7 +15,9 @@ |
| #include "components/arc/intent_helper/arc_intent_helper_bridge.h" |
| #include "components/arc/intent_helper/local_activity_resolver.h" |
| #include "content/public/browser/browser_thread.h" |
| +#include "content/public/browser/navigation_controller.h" |
| #include "content/public/browser/navigation_handle.h" |
| +#include "content/public/browser/web_contents.h" |
| #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| #include "ui/base/page_transition_types.h" |
| @@ -247,6 +249,8 @@ void ArcNavigationThrottle::OnIntentPickerClosed( |
| handlers[selected_app_index]->package_name); |
| handle->CancelDeferredNavigation( |
| content::NavigationThrottle::CANCEL_AND_IGNORE); |
| + if (handle->GetWebContents()->GetController().IsInitialNavigation()) |
|
Yusuke Sato
2016/09/16 22:42:04
Does handle->GetWebContents() always return a non-
djacobo_
2016/09/16 23:01:49
the intent picker has an observer for the WebConte
|
| + handle->GetWebContents()->Close(); |
| } |
| break; |
| } |