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

Side by Side Diff: chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.cc

Issue 14969012: components: Create web_modal component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-before-land 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698