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