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

Side by Side Diff: views/widget/widget_delegate.cc

Issue 7790010: Revert 98679 - Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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
« no previous file with comments | « views/widget/widget_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/widget/widget_delegate.h" 5 #include "views/widget/widget_delegate.h"
6 6
7 #include "views/view.h" 7 #include "views/view.h"
8 #include "views/views_delegate.h" 8 #include "views/views_delegate.h"
9 #include "views/widget/widget.h" 9 #include "views/widget/widget.h"
10 #include "views/window/client_view.h" 10 #include "views/window/client_view.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 bool WidgetDelegate::ExecuteWindowsCommand(int command_id) { 92 bool WidgetDelegate::ExecuteWindowsCommand(int command_id) {
93 return false; 93 return false;
94 } 94 }
95 95
96 std::wstring WidgetDelegate::GetWindowName() const { 96 std::wstring WidgetDelegate::GetWindowName() const {
97 return std::wstring(); 97 return std::wstring();
98 } 98 }
99 99
100 void WidgetDelegate::SaveWindowPlacement(const gfx::Rect& bounds, 100 void WidgetDelegate::SaveWindowPlacement(const gfx::Rect& bounds,
101 ui::WindowShowState show_state) { 101 bool maximized) {
102 std::wstring window_name = GetWindowName(); 102 std::wstring window_name = GetWindowName();
103 if (!ViewsDelegate::views_delegate || window_name.empty()) 103 if (!ViewsDelegate::views_delegate || window_name.empty())
104 return; 104 return;
105 105
106 ViewsDelegate::views_delegate->SaveWindowPlacement( 106 ViewsDelegate::views_delegate->SaveWindowPlacement(
107 GetWidget(), window_name, bounds, show_state); 107 GetWidget(), window_name, bounds, maximized);
108 } 108 }
109 109
110 bool WidgetDelegate::GetSavedWindowPlacement( 110 bool WidgetDelegate::GetSavedWindowBounds(gfx::Rect* bounds) const {
111 gfx::Rect* bounds,
112 ui::WindowShowState* show_state) const {
113 std::wstring window_name = GetWindowName(); 111 std::wstring window_name = GetWindowName();
114 if (!ViewsDelegate::views_delegate || window_name.empty()) 112 if (!ViewsDelegate::views_delegate || window_name.empty())
115 return false; 113 return false;
116 114
117 return ViewsDelegate::views_delegate->GetSavedWindowPlacement( 115 return ViewsDelegate::views_delegate->GetSavedWindowBounds(
118 window_name, bounds, show_state); 116 window_name, bounds);
117 }
118
119 bool WidgetDelegate::GetSavedMaximizedState(bool* maximized) const {
120 std::wstring window_name = GetWindowName();
121 if (!ViewsDelegate::views_delegate || window_name.empty())
122 return false;
123
124 return ViewsDelegate::views_delegate->GetSavedMaximizedState(
125 window_name, maximized);
119 } 126 }
120 127
121 bool WidgetDelegate::ShouldRestoreWindowSize() const { 128 bool WidgetDelegate::ShouldRestoreWindowSize() const {
122 return true; 129 return true;
123 } 130 }
124 131
125 View* WidgetDelegate::GetContentsView() { 132 View* WidgetDelegate::GetContentsView() {
126 if (!default_contents_view_) 133 if (!default_contents_view_)
127 default_contents_view_ = new View; 134 default_contents_view_ = new View;
128 return default_contents_view_; 135 return default_contents_view_;
(...skipping 23 matching lines...) Expand all
152 Widget* WidgetDelegateView::GetWidget() { 159 Widget* WidgetDelegateView::GetWidget() {
153 return View::GetWidget(); 160 return View::GetWidget();
154 } 161 }
155 162
156 const Widget* WidgetDelegateView::GetWidget() const { 163 const Widget* WidgetDelegateView::GetWidget() const {
157 return View::GetWidget(); 164 return View::GetWidget();
158 } 165 }
159 166
160 } // namespace views 167 } // namespace views
161 168
OLDNEW
« no previous file with comments | « views/widget/widget_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698