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

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 7c92feda8fb1cc748b61a9df9489ab179e1b3210..caff0f4441cf22e80d363915815a0a5932b56d43 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1514,14 +1514,15 @@ bool BrowserView::CanMinimize() const {
}
bool BrowserView::CanActivate() const {
- if (!AppModalDialogQueue::GetInstance()->active_dialog() ||
- !AppModalDialogQueue::GetInstance()->active_dialog()->native_dialog())
+ app_modal::AppModalDialogQueue* queue =
+ app_modal::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();
+ queue->ActivateModalDialog();
#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
@@ -2482,8 +2483,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::AppModalDialog* active_dialog =
+ app_modal::AppModalDialogQueue::GetInstance()->active_dialog();
if (!active_dialog)
return;
@@ -2494,7 +2495,7 @@ void BrowserView::ActivateAppModalDialog() const {
modal_browser->window()->Activate();
}
- AppModalDialogQueue::GetInstance()->ActivateModalDialog();
+ app_modal::AppModalDialogQueue::GetInstance()->ActivateModalDialog();
}
int BrowserView::GetMaxTopInfoBarArrowHeight() {

Powered by Google App Engine
This is Rietveld 408576698