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

Side by Side Diff: components/web_modal/web_contents_modal_dialog_manager.h

Issue 23815006: [Cleanup] rename WebContentsModalDialogManager::IsShowingDialog() to IsDialogActive() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ 5 #ifndef COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_
6 #define COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ 6 #define COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 21 matching lines...) Expand all
32 void SetDelegate(WebContentsModalDialogManagerDelegate* d); 32 void SetDelegate(WebContentsModalDialogManagerDelegate* d);
33 33
34 static NativeWebContentsModalDialogManager* CreateNativeManager( 34 static NativeWebContentsModalDialogManager* CreateNativeManager(
35 NativeWebContentsModalDialogManagerDelegate* native_delegate); 35 NativeWebContentsModalDialogManagerDelegate* native_delegate);
36 36
37 // Shows the dialog as a web contents modal dialog. The dialog will notify via 37 // Shows the dialog as a web contents modal dialog. The dialog will notify via
38 // WillClose() when it is being destroyed. 38 // WillClose() when it is being destroyed.
39 void ShowDialog(NativeWebContentsModalDialog dialog); 39 void ShowDialog(NativeWebContentsModalDialog dialog);
40 40
41 // Returns true if any dialogs are active and not closed. 41 // Returns true if any dialogs are active and not closed.
42 // TODO(wittman): Give this a better name, since it can return true if no 42 bool IsDialogActive() const;
43 // dialogs are displayed.
44 bool IsShowingDialog() const;
45 43
46 // Focus the topmost modal dialog. IsShowingDialog() must be true when 44 // Focus the topmost modal dialog. IsDialogActive() must be true when calling
47 // calling this function. 45 // this function.
48 void FocusTopmostDialog(); 46 void FocusTopmostDialog();
49 47
50 // Set to true to close the window when a page load starts on the WebContents. 48 // Set to true to close the window when a page load starts on the WebContents.
51 void SetCloseOnInterstitialWebUI(NativeWebContentsModalDialog dialog, 49 void SetCloseOnInterstitialWebUI(NativeWebContentsModalDialog dialog,
52 bool close); 50 bool close);
53 51
54 // Overriden from NativeWebContentsModalDialogManagerDelegate: 52 // Overriden from NativeWebContentsModalDialogManagerDelegate:
55 virtual content::WebContents* GetWebContents() const OVERRIDE; 53 virtual content::WebContents* GetWebContents() const OVERRIDE;
56 // Called when a WebContentsModalDialogs we own is about to be closed. 54 // Called when a WebContentsModalDialogs we own is about to be closed.
57 virtual void WillClose(NativeWebContentsModalDialog dialog) OVERRIDE; 55 virtual void WillClose(NativeWebContentsModalDialog dialog) OVERRIDE;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 124
127 // A scoped container for notification registries. 125 // A scoped container for notification registries.
128 content::NotificationRegistrar registrar_; 126 content::NotificationRegistrar registrar_;
129 127
130 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogManager); 128 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogManager);
131 }; 129 };
132 130
133 } // namespace web_modal 131 } // namespace web_modal
134 132
135 #endif // COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ 133 #endif // COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698