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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 287123002: [WebModals] New API for browser-scoped popup management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 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/tabs/tab_strip_model.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index 098d89d303ad3d9cef7e7662ddbaec5f78829b3b..6d43a3fbe5ecc745ba139285ac01e5091c31a1d3 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -21,7 +21,7 @@
#include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
#include "chrome/browser/ui/tabs/tab_strip_model_order_controller.h"
#include "chrome/common/url_constants.h"
-#include "components/web_modal/web_contents_modal_dialog_manager.h"
+#include "components/web_modal/popup_manager.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
@@ -315,10 +315,14 @@ void TabStripModel::InsertWebContentsAt(int index,
data->set_opener(active_contents);
}
- web_modal::WebContentsModalDialogManager* modal_dialog_manager =
- web_modal::WebContentsModalDialogManager::FromWebContents(contents);
- if (modal_dialog_manager)
- data->set_blocked(modal_dialog_manager->IsDialogActive());
+ // TODO(gbillock): This can be made more appropriate by asking the bubble
Peter Kasting 2014/07/08 19:13:54 Nit: What does "made more appropriate" mean?
Greg Billock 2014/07/09 19:28:12 "made better", "improved", "made more suitable or
Peter Kasting 2014/07/09 19:41:41 I would phrase it more directly then by omitting t
Greg Billock 2014/07/10 18:32:03 Done.
+ // manager whether the WebContents should be blocked, or perhaps just by
+ // letting the bubble manager make the blocking call directly and don't use
Peter Kasting 2014/07/08 19:13:54 Nit: don't use -> not using
Greg Billock 2014/07/09 19:28:12 Done.
+ // this at all.
+ web_modal::PopupManager* popup_manager =
+ web_modal::PopupManager::FromWebContents(contents);
+ if (popup_manager)
+ data->set_blocked(popup_manager->IsWebModalDialogActive(contents));
contents_data_.insert(contents_data_.begin() + index, data);

Powered by Google App Engine
This is Rietveld 408576698