| 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
|
|
|