Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 11072002: Combined window positioning and show state determiniation in the WindowSizer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed more build issues Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 chrome::GetSavedWindowBoundsAndShowState(browser_.get(), bounds, show_state);
1637 *show_state = chrome::GetSavedWindowShowState(browser_.get());
1638 1637
1639 #if defined(USE_ASH) 1638 #if defined(USE_ASH)
1640 if (browser_->is_type_popup() || browser_->is_type_panel()) { 1639 if (browser_->is_type_popup() || browser_->is_type_panel()) {
1641 // In case of a popup or panel with an 'unspecified' location we are looking 1640 // 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 1641 // for a good screen location. We are interpreting (0,0) as an unspecified
1643 // location. 1642 // location.
1644 if (bounds->x() == 0 && bounds->y() == 0) { 1643 if (bounds->x() == 0 && bounds->y() == 0) {
1645 *bounds = ChromeShellDelegate::instance()->window_positioner()-> 1644 *bounds = ChromeShellDelegate::instance()->window_positioner()->
1646 GetPopupPosition(*bounds); 1645 GetPopupPosition(*bounds);
1647 } 1646 }
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
2646 2645
2647 Browser* modal_browser = 2646 Browser* modal_browser =
2648 browser::FindBrowserWithWebContents(active_dialog->web_contents()); 2647 browser::FindBrowserWithWebContents(active_dialog->web_contents());
2649 if (modal_browser && (browser_ != modal_browser)) { 2648 if (modal_browser && (browser_ != modal_browser)) {
2650 modal_browser->window()->FlashFrame(true); 2649 modal_browser->window()->FlashFrame(true);
2651 modal_browser->window()->Activate(); 2650 modal_browser->window()->Activate();
2652 } 2651 }
2653 2652
2654 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2653 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2655 } 2654 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698