| 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 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 void CustomFrameView::UpdateWindowTitle() { | 200 void CustomFrameView::UpdateWindowTitle() { |
| 201 if (frame_->widget_delegate()->ShouldShowWindowTitle()) | 201 if (frame_->widget_delegate()->ShouldShowWindowTitle()) |
| 202 SchedulePaintInRect(title_bounds_); | 202 SchedulePaintInRect(title_bounds_); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void CustomFrameView::SizeConstraintsChanged() { | 205 void CustomFrameView::SizeConstraintsChanged() { |
| 206 ResetWindowControls(); | 206 ResetWindowControls(); |
| 207 LayoutWindowControls(); | 207 LayoutWindowControls(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void CustomFrameView::ActivationChanged(bool active) { |
| 211 if (active_ == active) |
| 212 return; |
| 213 active_ = active; |
| 214 SchedulePaint(); |
| 215 } |
| 216 |
| 210 /////////////////////////////////////////////////////////////////////////////// | 217 /////////////////////////////////////////////////////////////////////////////// |
| 211 // CustomFrameView, View overrides: | 218 // CustomFrameView, View overrides: |
| 212 | 219 |
| 213 void CustomFrameView::OnPaint(gfx::Canvas* canvas) { | 220 void CustomFrameView::OnPaint(gfx::Canvas* canvas) { |
| 214 if (!ShouldShowTitleBarAndBorder()) | 221 if (!ShouldShowTitleBarAndBorder()) |
| 215 return; | 222 return; |
| 216 | 223 |
| 217 if (frame_->IsMaximized()) | 224 if (frame_->IsMaximized()) |
| 218 PaintMaximizedFrameBorder(canvas); | 225 PaintMaximizedFrameBorder(canvas); |
| 219 else | 226 else |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 } | 638 } |
| 632 case views::FRAME_BUTTON_CLOSE: { | 639 case views::FRAME_BUTTON_CLOSE: { |
| 633 button = close_button_; | 640 button = close_button_; |
| 634 break; | 641 break; |
| 635 } | 642 } |
| 636 } | 643 } |
| 637 return button; | 644 return button; |
| 638 } | 645 } |
| 639 | 646 |
| 640 } // namespace views | 647 } // namespace views |
| OLD | NEW |