| 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 "ash/frame/custom_frame_view_ash.h" | 5 #include "ash/frame/custom_frame_view_ash.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/aura/wm_window_aura.h" | 10 #include "ash/aura/wm_window_aura.h" |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 void CustomFrameViewAsh::UpdateWindowIcon() {} | 509 void CustomFrameViewAsh::UpdateWindowIcon() {} |
| 510 | 510 |
| 511 void CustomFrameViewAsh::UpdateWindowTitle() { | 511 void CustomFrameViewAsh::UpdateWindowTitle() { |
| 512 header_view_->SchedulePaintForTitle(); | 512 header_view_->SchedulePaintForTitle(); |
| 513 } | 513 } |
| 514 | 514 |
| 515 void CustomFrameViewAsh::SizeConstraintsChanged() { | 515 void CustomFrameViewAsh::SizeConstraintsChanged() { |
| 516 header_view_->SizeConstraintsChanged(); | 516 header_view_->SizeConstraintsChanged(); |
| 517 } | 517 } |
| 518 | 518 |
| 519 void CustomFrameViewAsh::ActivationChanged(bool active) { |
| 520 // The icons differ between active and inactive. |
| 521 header_view_->SchedulePaint(); |
| 522 } |
| 523 |
| 519 //////////////////////////////////////////////////////////////////////////////// | 524 //////////////////////////////////////////////////////////////////////////////// |
| 520 // CustomFrameViewAsh, views::View overrides: | 525 // CustomFrameViewAsh, views::View overrides: |
| 521 | 526 |
| 522 gfx::Size CustomFrameViewAsh::GetPreferredSize() const { | 527 gfx::Size CustomFrameViewAsh::GetPreferredSize() const { |
| 523 gfx::Size pref = frame_->client_view()->GetPreferredSize(); | 528 gfx::Size pref = frame_->client_view()->GetPreferredSize(); |
| 524 gfx::Rect bounds(0, 0, pref.width(), pref.height()); | 529 gfx::Rect bounds(0, 0, pref.width(), pref.height()); |
| 525 return frame_->non_client_view() | 530 return frame_->non_client_view() |
| 526 ->GetWindowBoundsForClientBounds(bounds) | 531 ->GetWindowBoundsForClientBounds(bounds) |
| 527 .size(); | 532 .size(); |
| 528 } | 533 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 FrameCaptionButtonContainerView* | 607 FrameCaptionButtonContainerView* |
| 603 CustomFrameViewAsh::GetFrameCaptionButtonContainerViewForTest() { | 608 CustomFrameViewAsh::GetFrameCaptionButtonContainerViewForTest() { |
| 604 return header_view_->caption_button_container(); | 609 return header_view_->caption_button_container(); |
| 605 } | 610 } |
| 606 | 611 |
| 607 int CustomFrameViewAsh::NonClientTopBorderHeight() const { | 612 int CustomFrameViewAsh::NonClientTopBorderHeight() const { |
| 608 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight(); | 613 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight(); |
| 609 } | 614 } |
| 610 | 615 |
| 611 } // namespace ash | 616 } // namespace ash |
| OLD | NEW |