| 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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 | 816 |
| 817 void BrowserView::FlashFrame(bool flash) { | 817 void BrowserView::FlashFrame(bool flash) { |
| 818 frame_->FlashFrame(flash); | 818 frame_->FlashFrame(flash); |
| 819 } | 819 } |
| 820 | 820 |
| 821 bool BrowserView::IsAlwaysOnTop() const { | 821 bool BrowserView::IsAlwaysOnTop() const { |
| 822 return false; | 822 return false; |
| 823 } | 823 } |
| 824 | 824 |
| 825 gfx::NativeWindow BrowserView::GetNativeWindow() { | 825 gfx::NativeWindow BrowserView::GetNativeWindow() { |
| 826 // While the browser destruction is going on, the widget can already be gone, |
| 827 // but utility functions like FindBrowserWithWindow will come here and crash. |
| 828 // We short circuit therefore. |
| 829 if (!GetWidget()) |
| 830 return NULL; |
| 826 return GetWidget()->GetTopLevelWidget()->GetNativeWindow(); | 831 return GetWidget()->GetTopLevelWidget()->GetNativeWindow(); |
| 827 } | 832 } |
| 828 | 833 |
| 829 BrowserWindowTesting* BrowserView::GetBrowserWindowTesting() { | 834 BrowserWindowTesting* BrowserView::GetBrowserWindowTesting() { |
| 830 return this; | 835 return this; |
| 831 } | 836 } |
| 832 | 837 |
| 833 StatusBubble* BrowserView::GetStatusBubble() { | 838 StatusBubble* BrowserView::GetStatusBubble() { |
| 834 return status_bubble_.get(); | 839 return status_bubble_.get(); |
| 835 } | 840 } |
| (...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2817 modal_browser->window()->Activate(); | 2822 modal_browser->window()->Activate(); |
| 2818 } | 2823 } |
| 2819 | 2824 |
| 2820 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2825 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2821 } | 2826 } |
| 2822 | 2827 |
| 2823 void BrowserView::MaybeStackBookmarkBarAtTop() { | 2828 void BrowserView::MaybeStackBookmarkBarAtTop() { |
| 2824 if (bookmark_bar_view_.get()) | 2829 if (bookmark_bar_view_.get()) |
| 2825 bookmark_bar_view_->MaybeStackAtTop(); | 2830 bookmark_bar_view_->MaybeStackAtTop(); |
| 2826 } | 2831 } |
| OLD | NEW |