OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" |
| 6 |
| 7 #include "chrome/browser/platform_util.h" |
| 8 #include "chrome/common/render_messages.h" |
| 9 #include "content/public/browser/render_view_host.h" |
| 10 #include "content/public/browser/web_contents.h" |
| 11 #include "content/public/browser/web_contents_view.h" |
| 12 |
| 13 ChromeWebModalDialogManagerDelegate::ChromeWebModalDialogManagerDelegate() { |
| 14 } |
| 15 |
| 16 ChromeWebModalDialogManagerDelegate::~ChromeWebModalDialogManagerDelegate() { |
| 17 } |
| 18 |
| 19 void ChromeWebModalDialogManagerDelegate::SetWebContentsBlocked( |
| 20 content::WebContents* web_contents, |
| 21 bool blocked) { |
| 22 // RenderViewHost may be NULL during shutdown. |
| 23 content::RenderViewHost* host = web_contents->GetRenderViewHost(); |
| 24 if (host) { |
| 25 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( |
| 26 host->GetRoutingID(), blocked)); |
| 27 } |
| 28 } |
| 29 |
| 30 bool ChromeWebModalDialogManagerDelegate::IsWebContentsVisible( |
| 31 content::WebContents* web_contents) { |
| 32 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); |
| 33 } |
OLD | NEW |