Home | History | Annotate | Download | only in web_modal
      1 // Copyright (c) 2012 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 #ifndef COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_
      6 #define COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_
      7 
      8 namespace content {
      9 class WebContents;
     10 }
     11 
     12 namespace gfx {
     13 class Point;
     14 }
     15 
     16 namespace web_modal {
     17 
     18 class WebContentsModalDialogHost;
     19 
     20 class WebContentsModalDialogManagerDelegate {
     21  public:
     22   // Changes the blocked state of |web_contents|. WebContentses are considered
     23   // blocked while displaying a web contents modal dialog. During that time
     24   // renderer host will ignore any UI interaction within WebContents outside of
     25   // the currently displaying dialog.
     26   virtual void SetWebContentsBlocked(content::WebContents* web_contents,
     27                                      bool blocked);
     28 
     29   // Returns the WebContentsModalDialogHost for use in positioning web contents
     30   // modal dialogs within the browser window.
     31   virtual WebContentsModalDialogHost* GetWebContentsModalDialogHost();
     32 
     33   // Returns whether the WebContents is currently visible or not.
     34   virtual bool IsWebContentsVisible(content::WebContents* web_contents);
     35 
     36  protected:
     37   virtual ~WebContentsModalDialogManagerDelegate();
     38 };
     39 
     40 }  // namespace web_modal
     41 
     42 #endif  // COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_DELEGATE_H_
     43