summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 00:49:03 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-27 00:49:03 +0000
commit62655f97965430c3b89a471a946d82e8b97ac0df (patch)
treede5fa70d6b6fb89f7d55b6f02eb1aadbb7d8678f /chrome/views
parent6cf8200b22c068431941fd02d0525d9bbc5b4a5a (diff)
downloadchromium_src-62655f97965430c3b89a471a946d82e8b97ac0df.zip
chromium_src-62655f97965430c3b89a471a946d82e8b97ac0df.tar.gz
chromium_src-62655f97965430c3b89a471a946d82e8b97ac0df.tar.bz2
Non-functional cleanup:
* Clarify some comments. * Simplify some redundant boolean logic. * Add a helper function for something a lot of callers were checking manually. * Fix lint. Review URL: http://codereview.chromium.org/27247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10546 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r--chrome/views/window.cc2
-rw-r--r--chrome/views/window_delegate.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/chrome/views/window.cc b/chrome/views/window.cc
index ad18fab..2c3acff 100644
--- a/chrome/views/window.cc
+++ b/chrome/views/window.cc
@@ -630,7 +630,7 @@ DWORD Window::CalculateWindowStyle() {
DWORD window_styles = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_SYSMENU;
bool can_resize = window_delegate_->CanResize();
bool can_maximize = window_delegate_->CanMaximize();
- if ((can_resize && can_maximize) || can_maximize) {
+ if (can_maximize) {
window_styles |= WS_OVERLAPPEDWINDOW;
} else if (can_resize) {
window_styles |= WS_OVERLAPPED | WS_THICKFRAME;
diff --git a/chrome/views/window_delegate.h b/chrome/views/window_delegate.h
index e77f9c2..8f60db4 100644
--- a/chrome/views/window_delegate.h
+++ b/chrome/views/window_delegate.h
@@ -43,12 +43,12 @@ class WindowDelegate {
virtual DialogDelegate* AsDialogDelegate() { return NULL; }
- // Returns true if the window can be resized.
+ // Returns true if the window can ever be resized.
virtual bool CanResize() const {
return false;
}
- // Returns true if the window can be maximized.
+ // Returns true if the window can ever be maximized.
virtual bool CanMaximize() const {
return false;
}