| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 WidgetDelegate::SaveWindowPlacement(bounds, show_state); | 1626 WidgetDelegate::SaveWindowPlacement(bounds, show_state); |
| 1627 chrome::SaveWindowPlacement(browser_.get(), bounds, show_state); | 1627 chrome::SaveWindowPlacement(browser_.get(), bounds, show_state); |
| 1628 } | 1628 } |
| 1629 } | 1629 } |
| 1630 | 1630 |
| 1631 bool BrowserView::GetSavedWindowPlacement( | 1631 bool BrowserView::GetSavedWindowPlacement( |
| 1632 gfx::Rect* bounds, | 1632 gfx::Rect* bounds, |
| 1633 ui::WindowShowState* show_state) const { | 1633 ui::WindowShowState* show_state) const { |
| 1634 if (!ShouldSaveOrRestoreWindowPos()) | 1634 if (!ShouldSaveOrRestoreWindowPos()) |
| 1635 return false; | 1635 return false; |
| 1636 *bounds = chrome::GetSavedWindowBounds(browser_.get()); | 1636 *bounds = chrome::GetSavedWindowBoundsAndShowState(browser_.get(), |
| 1637 *show_state = chrome::GetSavedWindowShowState(browser_.get()); | 1637 *show_state); |
| 1638 | 1638 |
| 1639 #if defined(USE_ASH) | 1639 #if defined(USE_ASH) |
| 1640 if (browser_->is_type_popup() || browser_->is_type_panel()) { | 1640 if (browser_->is_type_popup() || browser_->is_type_panel()) { |
| 1641 // In case of a popup or panel with an 'unspecified' location we are looking | 1641 // In case of a popup or panel with an 'unspecified' location we are looking |
| 1642 // for a good screen location. We are interpreting (0,0) as an unspecified | 1642 // for a good screen location. We are interpreting (0,0) as an unspecified |
| 1643 // location. | 1643 // location. |
| 1644 if (bounds->x() == 0 && bounds->y() == 0) { | 1644 if (bounds->x() == 0 && bounds->y() == 0) { |
| 1645 *bounds = ChromeShellDelegate::instance()->window_positioner()-> | 1645 *bounds = ChromeShellDelegate::instance()->window_positioner()-> |
| 1646 GetPopupPosition(*bounds); | 1646 GetPopupPosition(*bounds); |
| 1647 } | 1647 } |
| (...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 | 2646 |
| 2647 Browser* modal_browser = | 2647 Browser* modal_browser = |
| 2648 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2648 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2649 if (modal_browser && (browser_ != modal_browser)) { | 2649 if (modal_browser && (browser_ != modal_browser)) { |
| 2650 modal_browser->window()->FlashFrame(true); | 2650 modal_browser->window()->FlashFrame(true); |
| 2651 modal_browser->window()->Activate(); | 2651 modal_browser->window()->Activate(); |
| 2652 } | 2652 } |
| 2653 | 2653 |
| 2654 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2654 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2655 } | 2655 } |
| OLD | NEW |