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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 } 1510 }
1511 1511
1512 bool BrowserView::CanActivate() const { 1512 bool BrowserView::CanActivate() const {
1513 if (!AppModalDialogQueue::GetInstance()->active_dialog()) 1513 if (!AppModalDialogQueue::GetInstance()->active_dialog())
1514 return true; 1514 return true;
1515 1515
1516 // If another browser is app modal, flash and activate the modal browser. This 1516 // If another browser is app modal, flash and activate the modal browser. This
1517 // has to be done in a post task, otherwise if the user clicked on a window 1517 // has to be done in a post task, otherwise if the user clicked on a window
1518 // that doesn't have the modal dialog the windows keep trying to get the focus 1518 // that doesn't have the modal dialog the windows keep trying to get the focus
1519 // from each other on Windows. http://crbug.com/141650. 1519 // from each other on Windows. http://crbug.com/141650.
1520 MessageLoop::current()->PostTask( 1520 base::MessageLoop::current()->PostTask(
1521 FROM_HERE, 1521 FROM_HERE,
1522 base::Bind(&BrowserView::ActivateAppModalDialog, 1522 base::Bind(&BrowserView::ActivateAppModalDialog,
1523 activate_modal_dialog_factory_.GetWeakPtr())); 1523 activate_modal_dialog_factory_.GetWeakPtr()));
1524 return false; 1524 return false;
1525 } 1525 }
1526 1526
1527 string16 BrowserView::GetWindowTitle() const { 1527 string16 BrowserView::GetWindowTitle() const {
1528 return browser_->GetWindowTitleForCurrentTab(); 1528 return browser_->GetWindowTitleForCurrentTab();
1529 } 1529 }
1530 1530
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2627 2627
2628 Browser* modal_browser = 2628 Browser* modal_browser =
2629 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); 2629 chrome::FindBrowserWithWebContents(active_dialog->web_contents());
2630 if (modal_browser && (browser_ != modal_browser)) { 2630 if (modal_browser && (browser_ != modal_browser)) {
2631 modal_browser->window()->FlashFrame(true); 2631 modal_browser->window()->FlashFrame(true);
2632 modal_browser->window()->Activate(); 2632 modal_browser->window()->Activate();
2633 } 2633 }
2634 2634
2635 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2635 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2636 } 2636 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/external_tab_container_win.cc ('k') | chrome/browser/ui/views/fullscreen_exit_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698