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

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

Issue 17500003: Close web contents modal dialogs on content load start (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Blocks/unblocks interaction with renderer process. 81 // Blocks/unblocks interaction with renderer process.
82 void BlockWebContentsInteraction(bool blocked); 82 void BlockWebContentsInteraction(bool blocked);
83 83
84 bool IsWebContentsVisible() const; 84 bool IsWebContentsVisible() const;
85 85
86 // Closes all WebContentsModalDialogs. 86 // Closes all WebContentsModalDialogs.
87 void CloseAllDialogs(); 87 void CloseAllDialogs();
88 88
89 // Overridden from content::WebContentsObserver: 89 // Overridden from content::WebContentsObserver:
90 virtual void DidNavigateMainFrame(
91 const content::LoadCommittedDetails& details,
92 const content::FrameNavigateParams& params) OVERRIDE;
93 virtual void DidGetIgnoredUIEvent() OVERRIDE; 90 virtual void DidGetIgnoredUIEvent() OVERRIDE;
94 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; 91 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE;
95 92
96 // Delegate for notifying our owner about stuff. Not owned by us. 93 // Delegate for notifying our owner about stuff. Not owned by us.
97 WebContentsModalDialogManagerDelegate* delegate_; 94 WebContentsModalDialogManagerDelegate* delegate_;
98 95
99 // Delegate for native UI-specific functions on the dialog. 96 // Delegate for native UI-specific functions on the dialog.
100 scoped_ptr<NativeWebContentsModalDialogManager> native_manager_; 97 scoped_ptr<NativeWebContentsModalDialogManager> native_manager_;
101 98
102 // All active dialogs. 99 // All active dialogs.
103 WebContentsModalDialogList child_dialogs_; 100 WebContentsModalDialogList child_dialogs_;
104 101
105 // True while closing the dialogs on WebContents close. 102 // True while closing the dialogs on WebContents close.
106 bool closing_all_dialogs_; 103 bool closing_all_dialogs_;
107 104
108 // A scoped container for notification registries. 105 // A scoped container for notification registries.
109 content::NotificationRegistrar registrar_; 106 content::NotificationRegistrar registrar_;
110 107
111 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogManager); 108 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogManager);
112 }; 109 };
113 110
114 } // namespace web_modal 111 } // namespace web_modal
115 112
116 #endif // COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_ 113 #endif // COMPONENTS_WEB_MODAL_WEB_CONTENTS_MODAL_DIALOG_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698