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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 23698003: [temporary M30 fix] Disable dragging tabs with web contents modal dialogs displayed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 7 years, 4 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/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 321fe2cd1497432896b352dc577f1964c72423d4..6841fd93fa618f6d749327c9241325a1900fb213 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1127,6 +1127,16 @@ void TabStrip::MaybeStartDrag(
gfx::Screen::GetScreenFor(widget->GetNativeView())->GetNumDisplays() == 1)
detach_behavior = TabDragController::NOT_DETACHABLE;
+#if defined(OS_CHROMEOS)
+ // TODO(wittman): This is a temporary workaround to avoid crbug.com/275274 and
+ // crbug.com/274856 in M30 and should be reverted after merge, as we have a
+ // solution to these bugs in trunk.
+ //
+ // Don't allow detaching if the tab has a WebContentsModalDialogView opened.
+ if (controller()->IsTabShowingWebViewModalDialog(GetModelIndexOfTab(tab)))
+ detach_behavior = TabDragController::NOT_DETACHABLE;
+#endif
+
#if defined(OS_WIN)
// It doesn't make sense to drag tabs out on Win8's single window Metro mode.
if (win8::IsSingleWindowMetroMode())
« no previous file with comments | « chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc ('k') | chrome/browser/ui/views/tabs/tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698