OLD | NEW |
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/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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 minimize_button_->SetState(CustomButton::BS_NORMAL); | 204 minimize_button_->SetState(CustomButton::BS_NORMAL); |
205 maximize_button_->SetState(CustomButton::BS_NORMAL); | 205 maximize_button_->SetState(CustomButton::BS_NORMAL); |
206 // The close button isn't affected by this constraint. | 206 // The close button isn't affected by this constraint. |
207 } | 207 } |
208 | 208 |
209 void CustomFrameView::UpdateWindowIcon() { | 209 void CustomFrameView::UpdateWindowIcon() { |
210 if (window_icon_) | 210 if (window_icon_) |
211 window_icon_->SchedulePaint(); | 211 window_icon_->SchedulePaint(); |
212 } | 212 } |
213 | 213 |
| 214 void CustomFrameView::UpdateWindowTitle() { |
| 215 SchedulePaintInRect(title_bounds_); |
| 216 } |
| 217 |
214 /////////////////////////////////////////////////////////////////////////////// | 218 /////////////////////////////////////////////////////////////////////////////// |
215 // CustomFrameView, View overrides: | 219 // CustomFrameView, View overrides: |
216 | 220 |
217 void CustomFrameView::OnPaint(gfx::Canvas* canvas) { | 221 void CustomFrameView::OnPaint(gfx::Canvas* canvas) { |
218 if (frame_->IsMaximized()) | 222 if (frame_->IsMaximized()) |
219 PaintMaximizedFrameBorder(canvas); | 223 PaintMaximizedFrameBorder(canvas); |
220 else | 224 else |
221 PaintRestoredFrameBorder(canvas); | 225 PaintRestoredFrameBorder(canvas); |
222 PaintTitleBar(canvas); | 226 PaintTitleBar(canvas); |
223 if (ShouldShowClientEdge()) | 227 if (ShouldShowClientEdge()) |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 rb.GetImageNamed(normal_image_id).ToImageSkia()); | 550 rb.GetImageNamed(normal_image_id).ToImageSkia()); |
547 button->SetImage(CustomButton::BS_HOT, | 551 button->SetImage(CustomButton::BS_HOT, |
548 rb.GetImageNamed(hot_image_id).ToImageSkia()); | 552 rb.GetImageNamed(hot_image_id).ToImageSkia()); |
549 button->SetImage(CustomButton::BS_PUSHED, | 553 button->SetImage(CustomButton::BS_PUSHED, |
550 rb.GetImageNamed(pushed_image_id).ToImageSkia()); | 554 rb.GetImageNamed(pushed_image_id).ToImageSkia()); |
551 AddChildView(button); | 555 AddChildView(button); |
552 return button; | 556 return button; |
553 } | 557 } |
554 | 558 |
555 } // namespace views | 559 } // namespace views |
OLD | NEW |