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

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

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 if (it->second == cmd_id) { 637 if (it->second == cmd_id) {
638 *accelerator = it->first; 638 *accelerator = it->first;
639 return true; 639 return true;
640 } 640 }
641 } 641 }
642 return false; 642 return false;
643 } 643 }
644 644
645 bool BrowserView::ActivateAppModalDialog() const { 645 bool BrowserView::ActivateAppModalDialog() const {
646 // If another browser is app modal, flash and activate the modal browser. 646 // If another browser is app modal, flash and activate the modal browser.
647 if (Singleton<AppModalDialogQueue>()->HasActiveDialog()) { 647 if (AppModalDialogQueue::GetInstance()->HasActiveDialog()) {
648 Browser* active_browser = BrowserList::GetLastActive(); 648 Browser* active_browser = BrowserList::GetLastActive();
649 if (active_browser && (browser_ != active_browser)) { 649 if (active_browser && (browser_ != active_browser)) {
650 active_browser->window()->FlashFrame(); 650 active_browser->window()->FlashFrame();
651 active_browser->window()->Activate(); 651 active_browser->window()->Activate();
652 } 652 }
653 Singleton<AppModalDialogQueue>()->ActivateModalDialog(); 653 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
654 return true; 654 return true;
655 } 655 }
656 return false; 656 return false;
657 } 657 }
658 658
659 void BrowserView::ActivationChanged(bool activated) { 659 void BrowserView::ActivationChanged(bool activated) {
660 if (activated) 660 if (activated)
661 BrowserList::SetLastActive(browser_.get()); 661 BrowserList::SetLastActive(browser_.get());
662 } 662 }
663 663
(...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); 2508 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME));
2509 2509
2510 return view; 2510 return view;
2511 } 2511 }
2512 #endif 2512 #endif
2513 2513
2514 // static 2514 // static
2515 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2515 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2516 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2516 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2517 } 2517 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_modal_dialogs/message_box_handler.cc ('k') | chrome/browser/zygote_host_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698