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

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

Issue 11348311: Fix logic for BrowserView::GetSavedWindowPlacement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 // looking for a good screen location. We are interpreting (0,0) as an 1839 // looking for a good screen location. We are interpreting (0,0) as an
1840 // unspecified location. 1840 // unspecified location.
1841 if (bounds->x() == 0 && bounds->y() == 0) { 1841 if (bounds->x() == 0 && bounds->y() == 0) {
1842 *bounds = ChromeShellDelegate::instance()->window_positioner()-> 1842 *bounds = ChromeShellDelegate::instance()->window_positioner()->
1843 GetPopupPosition(*bounds); 1843 GetPopupPosition(*bounds);
1844 } 1844 }
1845 } 1845 }
1846 } 1846 }
1847 #endif 1847 #endif
1848 1848
1849 if ((browser_->is_type_popup() && 1849 if ((browser_->is_type_popup() || browser_->is_type_panel()) &&
1850 !browser_->is_devtools() && !browser_->is_app()) || 1850 bounds->width() == browser_->override_bounds().width() &&
1851 (browser_->is_type_panel())) { 1851 bounds->height() == browser_->override_bounds().height() &&
1852 // We are a popup window. The value passed in |bounds| represents two 1852 !browser_->is_devtools()) {
1853 // pieces of information: 1853 // This is a popup window that has not been resized. The value passed in
1854 // |bounds| represents two pieces of information:
1854 // - the position of the window, in screen coordinates (outer position). 1855 // - the position of the window, in screen coordinates (outer position).
1855 // - the size of the content area (inner size). 1856 // - the size of the content area (inner size).
1856 // We need to use these values to determine the appropriate size and 1857 // We need to use these values to determine the appropriate size and
1857 // position of the resulting window. 1858 // position of the resulting window.
1858 if (IsToolbarVisible()) { 1859 if (IsToolbarVisible()) {
1859 // If we're showing the toolbar, we need to adjust |*bounds| to include 1860 // If we're showing the toolbar, we need to adjust |*bounds| to include
1860 // its desired height, since the toolbar is considered part of the 1861 // its desired height, since the toolbar is considered part of the
1861 // window's client area as far as GetWindowBoundsForClientBounds is 1862 // window's client area as far as GetWindowBoundsForClientBounds is
1862 // concerned... 1863 // concerned...
1863 bounds->set_height( 1864 bounds->set_height(
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
2781 modal_browser->window()->Activate(); 2782 modal_browser->window()->Activate();
2782 } 2783 }
2783 2784
2784 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2785 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2785 } 2786 }
2786 2787
2787 void BrowserView::MaybeStackBookmarkBarAtTop() { 2788 void BrowserView::MaybeStackBookmarkBarAtTop() {
2788 if (bookmark_bar_view_.get()) 2789 if (bookmark_bar_view_.get())
2789 bookmark_bar_view_->MaybeStackAtTop(); 2790 bookmark_bar_view_->MaybeStackAtTop();
2790 } 2791 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698