| 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/common/frame/custom_frame_view_ash.h" | 5 #include "ash/common/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/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 void CustomFrameViewAsh::UpdateWindowIcon() {} | 499 void CustomFrameViewAsh::UpdateWindowIcon() {} |
| 500 | 500 |
| 501 void CustomFrameViewAsh::UpdateWindowTitle() { | 501 void CustomFrameViewAsh::UpdateWindowTitle() { |
| 502 header_view_->SchedulePaintForTitle(); | 502 header_view_->SchedulePaintForTitle(); |
| 503 } | 503 } |
| 504 | 504 |
| 505 void CustomFrameViewAsh::SizeConstraintsChanged() { | 505 void CustomFrameViewAsh::SizeConstraintsChanged() { |
| 506 header_view_->SizeConstraintsChanged(); | 506 header_view_->SizeConstraintsChanged(); |
| 507 } | 507 } |
| 508 | 508 |
| 509 void CustomFrameViewAsh::ActivationChanged(bool active) { |
| 510 // The icons differ between active and inactive. |
| 511 header_view_->SchedulePaint(); |
| 512 } |
| 513 |
| 509 //////////////////////////////////////////////////////////////////////////////// | 514 //////////////////////////////////////////////////////////////////////////////// |
| 510 // CustomFrameViewAsh, views::View overrides: | 515 // CustomFrameViewAsh, views::View overrides: |
| 511 | 516 |
| 512 gfx::Size CustomFrameViewAsh::GetPreferredSize() const { | 517 gfx::Size CustomFrameViewAsh::GetPreferredSize() const { |
| 513 gfx::Size pref = frame_->client_view()->GetPreferredSize(); | 518 gfx::Size pref = frame_->client_view()->GetPreferredSize(); |
| 514 gfx::Rect bounds(0, 0, pref.width(), pref.height()); | 519 gfx::Rect bounds(0, 0, pref.width(), pref.height()); |
| 515 return frame_->non_client_view() | 520 return frame_->non_client_view() |
| 516 ->GetWindowBoundsForClientBounds(bounds) | 521 ->GetWindowBoundsForClientBounds(bounds) |
| 517 .size(); | 522 .size(); |
| 518 } | 523 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 FrameCaptionButtonContainerView* | 598 FrameCaptionButtonContainerView* |
| 594 CustomFrameViewAsh::GetFrameCaptionButtonContainerViewForTest() { | 599 CustomFrameViewAsh::GetFrameCaptionButtonContainerViewForTest() { |
| 595 return header_view_->caption_button_container(); | 600 return header_view_->caption_button_container(); |
| 596 } | 601 } |
| 597 | 602 |
| 598 int CustomFrameViewAsh::NonClientTopBorderHeight() const { | 603 int CustomFrameViewAsh::NonClientTopBorderHeight() const { |
| 599 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight(); | 604 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight(); |
| 600 } | 605 } |
| 601 | 606 |
| 602 } // namespace ash | 607 } // namespace ash |
| OLD | NEW |