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

Side by Side Diff: ui/views/examples/examples_window.cc

Issue 583603004: Add CanMinimize to classes that implement WidgetDelegate::CanMaximize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win_resizable
Patch Set: Add TODO. Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/views/examples/examples_window.h" 5 #include "ui/views/examples/examples_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 void SetStatus(const std::string& status) { 167 void SetStatus(const std::string& status) {
168 status_label_->SetText(base::UTF8ToUTF16(status)); 168 status_label_->SetText(base::UTF8ToUTF16(status));
169 } 169 }
170 170
171 static ExamplesWindowContents* instance() { return instance_; } 171 static ExamplesWindowContents* instance() { return instance_; }
172 172
173 private: 173 private:
174 // WidgetDelegateView: 174 // WidgetDelegateView:
175 virtual bool CanResize() const OVERRIDE { return true; } 175 virtual bool CanResize() const OVERRIDE { return true; }
176 virtual bool CanMaximize() const OVERRIDE { return true; } 176 virtual bool CanMaximize() const OVERRIDE { return true; }
177 virtual bool CanMinimize() const OVERRIDE { return true; }
177 virtual base::string16 GetWindowTitle() const OVERRIDE { 178 virtual base::string16 GetWindowTitle() const OVERRIDE {
178 return base::ASCIIToUTF16("Views Examples"); 179 return base::ASCIIToUTF16("Views Examples");
179 } 180 }
180 virtual View* GetContentsView() OVERRIDE { return this; } 181 virtual View* GetContentsView() OVERRIDE { return this; }
181 virtual void WindowClosing() OVERRIDE { 182 virtual void WindowClosing() OVERRIDE {
182 instance_ = NULL; 183 instance_ = NULL;
183 if (operation_ == QUIT_ON_CLOSE) 184 if (operation_ == QUIT_ON_CLOSE)
184 base::MessageLoopForUI::current()->Quit(); 185 base::MessageLoopForUI::current()->Quit();
185 } 186 }
186 187
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 widget->Show(); 226 widget->Show();
226 } 227 }
227 } 228 }
228 229
229 void LogStatus(const std::string& string) { 230 void LogStatus(const std::string& string) {
230 ExamplesWindowContents::instance()->SetStatus(string); 231 ExamplesWindowContents::instance()->SetStatus(string);
231 } 232 }
232 233
233 } // namespace examples 234 } // namespace examples
234 } // namespace views 235 } // namespace views
OLDNEW
« no previous file with comments | « content/shell/browser/shell_views.cc ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698