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

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: Addressed comments 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 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.cc ('k') | chrome/browser/ui/window_sizer/window_sizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698