| OLD | NEW |
| 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 "ui/views/window/custom_frame_view.h" | 5 #include "ui/views/window/custom_frame_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 void CustomFrameView::GetWindowMask(const gfx::Size& size, | 186 void CustomFrameView::GetWindowMask(const gfx::Size& size, |
| 187 gfx::Path* window_mask) { | 187 gfx::Path* window_mask) { |
| 188 DCHECK(window_mask); | 188 DCHECK(window_mask); |
| 189 if (frame_->IsMaximized()) | 189 if (frame_->IsMaximized()) |
| 190 return; | 190 return; |
| 191 | 191 |
| 192 views::GetDefaultWindowMask(size, window_mask); | 192 views::GetDefaultWindowMask(size, window_mask); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void CustomFrameView::EnableClose(bool enable) { |
| 196 close_button_->SetEnabled(enable); |
| 197 } |
| 198 |
| 195 void CustomFrameView::ResetWindowControls() { | 199 void CustomFrameView::ResetWindowControls() { |
| 196 restore_button_->SetState(CustomButton::BS_NORMAL); | 200 restore_button_->SetState(CustomButton::BS_NORMAL); |
| 197 minimize_button_->SetState(CustomButton::BS_NORMAL); | 201 minimize_button_->SetState(CustomButton::BS_NORMAL); |
| 198 maximize_button_->SetState(CustomButton::BS_NORMAL); | 202 maximize_button_->SetState(CustomButton::BS_NORMAL); |
| 199 // The close button isn't affected by this constraint. | 203 // The close button isn't affected by this constraint. |
| 200 } | 204 } |
| 201 | 205 |
| 202 void CustomFrameView::UpdateWindowIcon() { | 206 void CustomFrameView::UpdateWindowIcon() { |
| 203 window_icon_->SchedulePaint(); | 207 window_icon_->SchedulePaint(); |
| 204 } | 208 } |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 title_font_ = new gfx::Font(NativeWidgetWin::GetWindowTitleFont()); | 600 title_font_ = new gfx::Font(NativeWidgetWin::GetWindowTitleFont()); |
| 597 #elif defined(OS_LINUX) | 601 #elif defined(OS_LINUX) |
| 598 // TODO(ben): need to resolve what font this is. | 602 // TODO(ben): need to resolve what font this is. |
| 599 title_font_ = new gfx::Font(); | 603 title_font_ = new gfx::Font(); |
| 600 #endif | 604 #endif |
| 601 initialized = true; | 605 initialized = true; |
| 602 } | 606 } |
| 603 } | 607 } |
| 604 | 608 |
| 605 } // namespace views | 609 } // namespace views |
| OLD | NEW |