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

Unified Diff: components/web_modal/web_contents_modal_dialog_manager.cc

Issue 14969012: components: Create web_modal component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix-gtk-build Created 7 years, 7 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: components/web_modal/web_contents_modal_dialog_manager.cc
diff --git a/chrome/browser/ui/web_contents_modal_dialog_manager.cc b/components/web_modal/web_contents_modal_dialog_manager.cc
similarity index 93%
rename from chrome/browser/ui/web_contents_modal_dialog_manager.cc
rename to components/web_modal/web_contents_modal_dialog_manager.cc
index 2b72e4a94020355dc356ff41309d286e486c4f73..4a425ad9aa2b123f5ba1562c2e2a6a25e9d68d07 100644
--- a/chrome/browser/ui/web_contents_modal_dialog_manager.cc
+++ b/components/web_modal/web_contents_modal_dialog_manager.cc
@@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/web_contents_modal_dialog_manager.h"
+#include "components/web_modal/web_contents_modal_dialog_manager.h"
-#include "chrome/browser/ui/web_contents_modal_dialog_manager_delegate.h"
-#include "chrome/common/render_messages.h"
+#include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
@@ -17,7 +16,9 @@
using content::WebContents;
-DEFINE_WEB_CONTENTS_USER_DATA_KEY(WebContentsModalDialogManager);
+DEFINE_WEB_CONTENTS_USER_DATA_KEY(web_modal::WebContentsModalDialogManager);
+
+namespace web_modal {
WebContentsModalDialogManager::~WebContentsModalDialogManager() {
DCHECK(child_dialogs_.empty());
@@ -44,11 +45,9 @@ void WebContentsModalDialogManager::BlockWebContentsInteraction(bool blocked) {
// RenderViewHost may be NULL during shutdown.
content::RenderViewHost* host = contents->GetRenderViewHost();
- if (host) {
+ if (host)
host->SetIgnoreInputEvents(blocked);
- host->Send(new ChromeViewMsg_SetVisuallyDeemphasized(
- host->GetRoutingID(), blocked));
- }
+
if (delegate_)
delegate_->SetWebContentsBlocked(contents, blocked);
}
@@ -150,3 +149,5 @@ void WebContentsModalDialogManager::WebContentsDestroyed(WebContents* tab) {
// twice before it runs.
CloseAllDialogs();
}
+
+} // namespace web_modal

Powered by Google App Engine
This is Rietveld 408576698