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

Unified Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.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/browser_tab_strip_controller.cc
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 6aedb9ba6d02c19f0f570164632434466a3178d8..b9ad12f6a8568d0a785eb19c571c45294f441f9b 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -26,6 +26,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
@@ -38,6 +39,7 @@
using content::UserMetricsAction;
using content::WebContents;
+using web_modal::WebContentsModalDialogManager;
namespace {
@@ -364,6 +366,15 @@ void BrowserTabStripController::LayoutTypeMaybeChanged() {
static_cast<int>(tabstrip_->layout_type()));
}
+bool BrowserTabStripController::IsTabShowingWebViewModalDialog(int index) {
+ DCHECK(model_->ContainsIndex(index));
+ WebContentsModalDialogManager* contents_modal_dialog_manager =
+ WebContentsModalDialogManager::FromWebContents(
+ model_->GetWebContentsAt(index));
+ return contents_modal_dialog_manager &&
+ contents_modal_dialog_manager->IsShowingDialog();
+}
+
void BrowserTabStripController::OnStartedDraggingTabs() {
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_);
if (browser_view && !immersive_reveal_lock_.get()) {

Powered by Google App Engine
This is Rietveld 408576698