OLD | NEW |
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 2584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2595 | 2595 |
2596 void BrowserView::ActivateAppModalDialog() const { | 2596 void BrowserView::ActivateAppModalDialog() const { |
2597 // If another browser is app modal, flash and activate the modal browser. | 2597 // If another browser is app modal, flash and activate the modal browser. |
2598 app_modal::AppModalDialog* active_dialog = | 2598 app_modal::AppModalDialog* active_dialog = |
2599 app_modal::AppModalDialogQueue::GetInstance()->active_dialog(); | 2599 app_modal::AppModalDialogQueue::GetInstance()->active_dialog(); |
2600 if (!active_dialog) | 2600 if (!active_dialog) |
2601 return; | 2601 return; |
2602 | 2602 |
2603 Browser* modal_browser = | 2603 Browser* modal_browser = |
2604 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2604 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
2605 if (modal_browser && (browser_ != modal_browser)) { | 2605 if (modal_browser && (browser_.get() != modal_browser)) { |
2606 modal_browser->window()->FlashFrame(true); | 2606 modal_browser->window()->FlashFrame(true); |
2607 modal_browser->window()->Activate(); | 2607 modal_browser->window()->Activate(); |
2608 } | 2608 } |
2609 | 2609 |
2610 app_modal::AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2610 app_modal::AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2611 } | 2611 } |
2612 | 2612 |
2613 int BrowserView::GetMaxTopInfoBarArrowHeight() { | 2613 int BrowserView::GetMaxTopInfoBarArrowHeight() { |
2614 int top_arrow_height = 0; | 2614 int top_arrow_height = 0; |
2615 // Only show the arrows when not in fullscreen and when there's no omnibox | 2615 // Only show the arrows when not in fullscreen and when there's no omnibox |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2657 return immersive_mode_controller()->IsEnabled(); | 2657 return immersive_mode_controller()->IsEnabled(); |
2658 } | 2658 } |
2659 | 2659 |
2660 views::Widget* BrowserView::GetBubbleAssociatedWidget() { | 2660 views::Widget* BrowserView::GetBubbleAssociatedWidget() { |
2661 return GetWidget(); | 2661 return GetWidget(); |
2662 } | 2662 } |
2663 | 2663 |
2664 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { | 2664 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { |
2665 return top_container_->GetBoundsInScreen(); | 2665 return top_container_->GetBoundsInScreen(); |
2666 } | 2666 } |
OLD | NEW |