summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-15 00:32:04 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-15 00:32:04 +0000
commitbc9a5157e6843721680e49185dc86ac5885a0c11 (patch)
tree8b94dcceb7ac4a1970846a71ef7bf28cb1603432 /chrome/browser/views/frame
parente0ab532efa30307f09fdb62e5648f71ec704d378 (diff)
downloadchromium_src-bc9a5157e6843721680e49185dc86ac5885a0c11.zip
chromium_src-bc9a5157e6843721680e49185dc86ac5885a0c11.tar.gz
chromium_src-bc9a5157e6843721680e49185dc86ac5885a0c11.tar.bz2
Make the Browser restore saved last size/position using the WindowDelegate code rather than hand-rolling its own.
Review URL: http://codereview.chromium.org/10959 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame')
-rw-r--r--chrome/browser/views/frame/browser_view.cc9
-rw-r--r--chrome/browser/views/frame/browser_view.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 873d38a..b13f0b3 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -709,10 +709,17 @@ bool BrowserView::ExecuteWindowsCommand(int command_id) {
return false;
}
+std::wstring BrowserView::GetWindowName() const {
+ return browser_->GetWindowPlacementKey();
+}
+
void BrowserView::SaveWindowPlacement(const gfx::Rect& bounds,
bool maximized,
bool always_on_top) {
- browser_->SaveWindowPlacement(bounds, maximized);
+ if (browser_->ShouldSaveWindowPlacement()) {
+ WindowDelegate::SaveWindowPlacement(bounds, maximized, always_on_top);
+ browser_->SaveWindowPlacement(bounds, maximized);
+ }
}
bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const {
diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h
index bf6a41b..fcc0ee4 100644
--- a/chrome/browser/views/frame/browser_view.h
+++ b/chrome/browser/views/frame/browser_view.h
@@ -197,6 +197,7 @@ class BrowserView : public BrowserWindow,
virtual SkBitmap GetWindowIcon();
virtual bool ShouldShowWindowIcon() const;
virtual bool ExecuteWindowsCommand(int command_id);
+ virtual std::wstring GetWindowName() const;
virtual void SaveWindowPlacement(const gfx::Rect& bounds,
bool maximized,
bool always_on_top);