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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 688853005: Consolidate javascript_dialog_manager.h and javascript_dialog_manager_impl.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 6ed2bca365ae6898b1f4c9c7e0ebd4ff78ca6e29..6c20a39e1c3aa303a26f5309c82a392462c09932 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1502,14 +1502,15 @@ bool BrowserView::CanMinimize() const {
}
bool BrowserView::CanActivate() const {
- if (!AppModalDialogQueue::GetInstance()->active_dialog() ||
- !AppModalDialogQueue::GetInstance()->active_dialog()->native_dialog())
+ app_modal_dialogs::AppModalDialogQueue* queue =
+ app_modal_dialogs::AppModalDialogQueue::GetInstance();
+ if (!queue->active_dialog() || !queue->active_dialog()->native_dialog())
return true;
#if defined(USE_AURA) && defined(OS_CHROMEOS)
// On Aura window manager controls all windows so settings focus via PostTask
// will make only worse because posted task will keep trying to steal focus.
- AppModalDialogQueue::GetInstance()->ActivateModalDialog();
+ app_modal_dialogs::AppModalDialogQueue::GetInstance()->ActivateModalDialog();
msw 2014/11/15 00:51:56 nit: use |queue| here.
oshima 2014/11/18 17:42:41 Done.
#else
// If another browser is app modal, flash and activate the modal browser. This
// has to be done in a post task, otherwise if the user clicked on a window
@@ -2491,8 +2492,8 @@ bool BrowserView::DoCutCopyPasteForWebContents(
void BrowserView::ActivateAppModalDialog() const {
// If another browser is app modal, flash and activate the modal browser.
- AppModalDialog* active_dialog =
- AppModalDialogQueue::GetInstance()->active_dialog();
+ app_modal_dialogs::AppModalDialog* active_dialog =
+ app_modal_dialogs::AppModalDialogQueue::GetInstance()->active_dialog();
if (!active_dialog)
return;
@@ -2503,7 +2504,7 @@ void BrowserView::ActivateAppModalDialog() const {
modal_browser->window()->Activate();
}
- AppModalDialogQueue::GetInstance()->ActivateModalDialog();
+ app_modal_dialogs::AppModalDialogQueue::GetInstance()->ActivateModalDialog();
}
int BrowserView::GetMaxTopInfoBarArrowHeight() {

Powered by Google App Engine
This is Rietveld 408576698