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

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

Issue 13375002: Revert issue 158379 (chrome.window.create height) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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 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 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 // unspecified location. 1726 // unspecified location.
1727 if (bounds->x() == 0 && bounds->y() == 0) { 1727 if (bounds->x() == 0 && bounds->y() == 0) {
1728 *bounds = ChromeShellDelegate::instance()->window_positioner()-> 1728 *bounds = ChromeShellDelegate::instance()->window_positioner()->
1729 GetPopupPosition(*bounds); 1729 GetPopupPosition(*bounds);
1730 } 1730 }
1731 } 1731 }
1732 } 1732 }
1733 #endif 1733 #endif
1734 1734
1735 if ((browser_->is_type_popup() || browser_->is_type_panel()) && 1735 if ((browser_->is_type_popup() || browser_->is_type_panel()) &&
1736 bounds->width() == browser_->override_bounds().width() && 1736 !browser_->is_app() &&
1737 bounds->height() == browser_->override_bounds().height() &&
1738 !(browser_->is_app() && browser_->is_session_restore()) &&
1739 !browser_->is_devtools()) { 1737 !browser_->is_devtools()) {
1740 // This is neither a popup window that has not been resized nor it is not an 1738 // This is non-app popup window. The value passed in |bounds| represents
1741 // application window in the session restore phase. The value passed in 1739 // two pieces of information:
1742 // |bounds| represents two pieces of information:
1743 // - the position of the window, in screen coordinates (outer position). 1740 // - the position of the window, in screen coordinates (outer position).
1744 // - the size of the content area (inner size). 1741 // - the size of the content area (inner size).
1745 // We need to use these values to determine the appropriate size and 1742 // We need to use these values to determine the appropriate size and
1746 // position of the resulting window. 1743 // position of the resulting window.
1747 if (IsToolbarVisible()) { 1744 if (IsToolbarVisible()) {
1748 // If we're showing the toolbar, we need to adjust |*bounds| to include 1745 // If we're showing the toolbar, we need to adjust |*bounds| to include
1749 // its desired height, since the toolbar is considered part of the 1746 // its desired height, since the toolbar is considered part of the
1750 // window's client area as far as GetWindowBoundsForClientBounds is 1747 // window's client area as far as GetWindowBoundsForClientBounds is
1751 // concerned... 1748 // concerned...
1752 bounds->set_height( 1749 bounds->set_height(
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
2727 2724
2728 Browser* modal_browser = 2725 Browser* modal_browser =
2729 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); 2726 chrome::FindBrowserWithWebContents(active_dialog->web_contents());
2730 if (modal_browser && (browser_ != modal_browser)) { 2727 if (modal_browser && (browser_ != modal_browser)) {
2731 modal_browser->window()->FlashFrame(true); 2728 modal_browser->window()->FlashFrame(true);
2732 modal_browser->window()->Activate(); 2729 modal_browser->window()->Activate();
2733 } 2730 }
2734 2731
2735 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2732 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2736 } 2733 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | chrome/common/extensions/api/windows.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698