| 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 | 767 |
| 768 void BrowserView::ZoomChangedForActiveTab(bool can_show_bubble) { | 768 void BrowserView::ZoomChangedForActiveTab(bool can_show_bubble) { |
| 769 GetLocationBarView()->ZoomChangedForActiveTab( | 769 GetLocationBarView()->ZoomChangedForActiveTab( |
| 770 can_show_bubble && !toolbar_->IsWrenchMenuShowing()); | 770 can_show_bubble && !toolbar_->IsWrenchMenuShowing()); |
| 771 } | 771 } |
| 772 | 772 |
| 773 gfx::Rect BrowserView::GetRestoredBounds() const { | 773 gfx::Rect BrowserView::GetRestoredBounds() const { |
| 774 return frame_->GetRestoredBounds(); | 774 return frame_->GetRestoredBounds(); |
| 775 } | 775 } |
| 776 | 776 |
| 777 ui::WindowShowState BrowserView::GetRestoredState() const { |
| 778 if (IsMaximized()) |
| 779 return ui::SHOW_STATE_MAXIMIZED; |
| 780 if (IsMinimized()) |
| 781 return ui::SHOW_STATE_MINIMIZED; |
| 782 return ui::SHOW_STATE_NORMAL; |
| 783 } |
| 784 |
| 777 gfx::Rect BrowserView::GetBounds() const { | 785 gfx::Rect BrowserView::GetBounds() const { |
| 778 return frame_->GetWindowBoundsInScreen(); | 786 return frame_->GetWindowBoundsInScreen(); |
| 779 } | 787 } |
| 780 | 788 |
| 781 bool BrowserView::IsMaximized() const { | 789 bool BrowserView::IsMaximized() const { |
| 782 return frame_->IsMaximized(); | 790 return frame_->IsMaximized(); |
| 783 } | 791 } |
| 784 | 792 |
| 785 bool BrowserView::IsMinimized() const { | 793 bool BrowserView::IsMinimized() const { |
| 786 return frame_->IsMinimized(); | 794 return frame_->IsMinimized(); |
| (...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2619 | 2627 |
| 2620 Browser* modal_browser = | 2628 Browser* modal_browser = |
| 2621 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); | 2629 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2622 if (modal_browser && (browser_ != modal_browser)) { | 2630 if (modal_browser && (browser_ != modal_browser)) { |
| 2623 modal_browser->window()->FlashFrame(true); | 2631 modal_browser->window()->FlashFrame(true); |
| 2624 modal_browser->window()->Activate(); | 2632 modal_browser->window()->Activate(); |
| 2625 } | 2633 } |
| 2626 | 2634 |
| 2627 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2635 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2628 } | 2636 } |
| OLD | NEW |