| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 if (it->second == cmd_id) { | 463 if (it->second == cmd_id) { |
| 464 *accelerator = it->first; | 464 *accelerator = it->first; |
| 465 return true; | 465 return true; |
| 466 } | 466 } |
| 467 } | 467 } |
| 468 return false; | 468 return false; |
| 469 } | 469 } |
| 470 | 470 |
| 471 bool BrowserView::ActivateAppModalDialog() const { | 471 bool BrowserView::ActivateAppModalDialog() const { |
| 472 // If another browser is app modal, flash and activate the modal browser. | 472 // If another browser is app modal, flash and activate the modal browser. |
| 473 if (AppModalDialogQueue::HasActiveDialog()) { | 473 if (Singleton<AppModalDialogQueue>()->HasActiveDialog()) { |
| 474 Browser* active_browser = BrowserList::GetLastActive(); | 474 Browser* active_browser = BrowserList::GetLastActive(); |
| 475 if (active_browser && (browser_ != active_browser)) { | 475 if (active_browser && (browser_ != active_browser)) { |
| 476 active_browser->window()->FlashFrame(); | 476 active_browser->window()->FlashFrame(); |
| 477 active_browser->window()->Activate(); | 477 active_browser->window()->Activate(); |
| 478 } | 478 } |
| 479 AppModalDialogQueue::ActivateModalDialog(); | 479 Singleton<AppModalDialogQueue>()->ActivateModalDialog(); |
| 480 return true; | 480 return true; |
| 481 } | 481 } |
| 482 return false; | 482 return false; |
| 483 } | 483 } |
| 484 | 484 |
| 485 void BrowserView::ActivationChanged(bool activated) { | 485 void BrowserView::ActivationChanged(bool activated) { |
| 486 if (activated) | 486 if (activated) |
| 487 BrowserList::SetLastActive(browser_.get()); | 487 BrowserList::SetLastActive(browser_.get()); |
| 488 } | 488 } |
| 489 | 489 |
| (...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1718 | 1718 |
| 1719 // static | 1719 // static |
| 1720 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 1720 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
| 1721 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); | 1721 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); |
| 1722 } | 1722 } |
| 1723 | 1723 |
| 1724 // static | 1724 // static |
| 1725 void BrowserList::AllBrowsersClosed() { | 1725 void BrowserList::AllBrowsersClosed() { |
| 1726 views::Window::CloseAllSecondaryWindows(); | 1726 views::Window::CloseAllSecondaryWindows(); |
| 1727 } | 1727 } |
| OLD | NEW |