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 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2587 | 2587 |
2588 void BrowserView::ActivateAppModalDialog() const { | 2588 void BrowserView::ActivateAppModalDialog() const { |
2589 // If another browser is app modal, flash and activate the modal browser. | 2589 // If another browser is app modal, flash and activate the modal browser. |
2590 app_modal::AppModalDialog* active_dialog = | 2590 app_modal::AppModalDialog* active_dialog = |
2591 app_modal::AppModalDialogQueue::GetInstance()->active_dialog(); | 2591 app_modal::AppModalDialogQueue::GetInstance()->active_dialog(); |
2592 if (!active_dialog) | 2592 if (!active_dialog) |
2593 return; | 2593 return; |
2594 | 2594 |
2595 Browser* modal_browser = | 2595 Browser* modal_browser = |
2596 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2596 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
2597 if (modal_browser && (browser_ != modal_browser)) { | 2597 if (modal_browser && (browser_.get() != modal_browser)) { |
2598 modal_browser->window()->FlashFrame(true); | 2598 modal_browser->window()->FlashFrame(true); |
2599 modal_browser->window()->Activate(); | 2599 modal_browser->window()->Activate(); |
2600 } | 2600 } |
2601 | 2601 |
2602 app_modal::AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2602 app_modal::AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2603 } | 2603 } |
2604 | 2604 |
2605 int BrowserView::GetMaxTopInfoBarArrowHeight() { | 2605 int BrowserView::GetMaxTopInfoBarArrowHeight() { |
2606 int top_arrow_height = 0; | 2606 int top_arrow_height = 0; |
2607 // Only show the arrows when not in fullscreen and when there's no omnibox | 2607 // 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... |
2649 return immersive_mode_controller()->IsEnabled(); | 2649 return immersive_mode_controller()->IsEnabled(); |
2650 } | 2650 } |
2651 | 2651 |
2652 views::Widget* BrowserView::GetBubbleAssociatedWidget() { | 2652 views::Widget* BrowserView::GetBubbleAssociatedWidget() { |
2653 return GetWidget(); | 2653 return GetWidget(); |
2654 } | 2654 } |
2655 | 2655 |
2656 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { | 2656 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { |
2657 return top_container_->GetBoundsInScreen(); | 2657 return top_container_->GetBoundsInScreen(); |
2658 } | 2658 } |
OLD | NEW |