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

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

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 #include "components/web_modal/web_contents_modal_dialog_manager.h" 5 #include "components/web_modal/web_contents_modal_dialog_manager.h"
6 6
7 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 7 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
8 #include "content/public/browser/navigation_details.h" 8 #include "content/public/browser/navigation_details.h"
9 #include "content/public/browser/navigation_entry.h" 9 #include "content/public/browser/navigation_entry.h"
10 #include "content/public/browser/notification_details.h" 10 #include "content/public/browser/notification_details.h"
(...skipping 27 matching lines...) Expand all
38 38
39 native_manager_->ManageDialog(dialog); 39 native_manager_->ManageDialog(dialog);
40 40
41 if (child_dialogs_.size() == 1) { 41 if (child_dialogs_.size() == 1) {
42 if (delegate_ && delegate_->IsWebContentsVisible(web_contents())) 42 if (delegate_ && delegate_->IsWebContentsVisible(web_contents()))
43 native_manager_->ShowDialog(dialog); 43 native_manager_->ShowDialog(dialog);
44 BlockWebContentsInteraction(true); 44 BlockWebContentsInteraction(true);
45 } 45 }
46 } 46 }
47 47
48 bool WebContentsModalDialogManager::IsShowingDialog() const { 48 bool WebContentsModalDialogManager::IsDialogActive() const {
49 return !child_dialogs_.empty(); 49 return !child_dialogs_.empty();
50 } 50 }
51 51
52 void WebContentsModalDialogManager::FocusTopmostDialog() { 52 void WebContentsModalDialogManager::FocusTopmostDialog() {
53 DCHECK(!child_dialogs_.empty()); 53 DCHECK(!child_dialogs_.empty());
54 native_manager_->FocusDialog(child_dialogs_.front().dialog); 54 native_manager_->FocusDialog(child_dialogs_.front().dialog);
55 } 55 }
56 56
57 void WebContentsModalDialogManager::SetCloseOnInterstitialWebUI( 57 void WebContentsModalDialogManager::SetCloseOnInterstitialWebUI(
58 NativeWebContentsModalDialog dialog, 58 NativeWebContentsModalDialog dialog,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // list. 182 // list.
183 WebContentsModalDialogList dialogs(child_dialogs_); 183 WebContentsModalDialogList dialogs(child_dialogs_);
184 for (WebContentsModalDialogList::iterator it = dialogs.begin(); 184 for (WebContentsModalDialogList::iterator it = dialogs.begin();
185 it != dialogs.end(); ++it) { 185 it != dialogs.end(); ++it) {
186 if (it->close_on_interstitial_webui) 186 if (it->close_on_interstitial_webui)
187 native_manager_->CloseDialog(it->dialog); 187 native_manager_->CloseDialog(it->dialog);
188 } 188 }
189 } 189 }
190 190
191 } // namespace web_modal 191 } // namespace web_modal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698