| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/views/frame/browser_view.h" | 5 #include "chrome/browser/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include "app/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
| 8 #include "app/gfx/chrome_canvas.h" | 8 #include "app/gfx/chrome_canvas.h" |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/os_exchange_data.h" | 10 #include "app/os_exchange_data.h" |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 return true; | 1000 return true; |
| 1001 } | 1001 } |
| 1002 return false; | 1002 return false; |
| 1003 } | 1003 } |
| 1004 | 1004 |
| 1005 std::wstring BrowserView::GetWindowName() const { | 1005 std::wstring BrowserView::GetWindowName() const { |
| 1006 return browser_->GetWindowPlacementKey(); | 1006 return browser_->GetWindowPlacementKey(); |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 void BrowserView::SaveWindowPlacement(const gfx::Rect& bounds, | 1009 void BrowserView::SaveWindowPlacement(const gfx::Rect& bounds, |
| 1010 bool maximized, | 1010 bool maximized) { |
| 1011 bool always_on_top) { | |
| 1012 // If IsFullscreen() is true, we've just changed into fullscreen mode, and | 1011 // If IsFullscreen() is true, we've just changed into fullscreen mode, and |
| 1013 // we're catching the going-into-fullscreen sizing and positioning calls, | 1012 // we're catching the going-into-fullscreen sizing and positioning calls, |
| 1014 // which we want to ignore. | 1013 // which we want to ignore. |
| 1015 if (!IsFullscreen() && browser_->ShouldSaveWindowPlacement()) { | 1014 if (!IsFullscreen() && browser_->ShouldSaveWindowPlacement()) { |
| 1016 WindowDelegate::SaveWindowPlacement(bounds, maximized, always_on_top); | 1015 WindowDelegate::SaveWindowPlacement(bounds, maximized); |
| 1017 browser_->SaveWindowPlacement(bounds, maximized); | 1016 browser_->SaveWindowPlacement(bounds, maximized); |
| 1018 } | 1017 } |
| 1019 } | 1018 } |
| 1020 | 1019 |
| 1021 bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const { | 1020 bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const { |
| 1022 *bounds = browser_->GetSavedWindowBounds(); | 1021 *bounds = browser_->GetSavedWindowBounds(); |
| 1023 if (browser_->type() & Browser::TYPE_POPUP) { | 1022 if (browser_->type() & Browser::TYPE_POPUP) { |
| 1024 // We are a popup window. The value passed in |bounds| represents two | 1023 // We are a popup window. The value passed in |bounds| represents two |
| 1025 // pieces of information: | 1024 // pieces of information: |
| 1026 // - the position of the window, in screen coordinates (outer position). | 1025 // - the position of the window, in screen coordinates (outer position). |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1677 | 1676 |
| 1678 // static | 1677 // static |
| 1679 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { | 1678 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { |
| 1680 return new FindBarWin(static_cast<BrowserView*>(browser->window())); | 1679 return new FindBarWin(static_cast<BrowserView*>(browser->window())); |
| 1681 } | 1680 } |
| 1682 | 1681 |
| 1683 // static | 1682 // static |
| 1684 void BrowserList::AllBrowsersClosed() { | 1683 void BrowserList::AllBrowsersClosed() { |
| 1685 views::Window::CloseAllSecondaryWindows(); | 1684 views::Window::CloseAllSecondaryWindows(); |
| 1686 } | 1685 } |
| OLD | NEW |