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

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

Issue 2347273002: Closing unused new tabs for ARC (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
« no previous file with comments | « no previous file | chrome/browser/ui/views/intent_picker_bubble_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/intent_picker_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698