| 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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 CustomFrameViewAsh::HeaderView::~HeaderView() { | 220 CustomFrameViewAsh::HeaderView::~HeaderView() { |
| 221 Shell::GetInstance()->RemoveShellObserver(this); | 221 Shell::GetInstance()->RemoveShellObserver(this); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void CustomFrameViewAsh::HeaderView::SchedulePaintForTitle() { | 224 void CustomFrameViewAsh::HeaderView::SchedulePaintForTitle() { |
| 225 header_painter_->SchedulePaintForTitle(); | 225 header_painter_->SchedulePaintForTitle(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void CustomFrameViewAsh::HeaderView::ResetWindowControls() { | 228 void CustomFrameViewAsh::HeaderView::ResetWindowControls() { |
| 229 caption_button_container_->ResetWindowControls(); | 229 caption_button_container_->ResetWindowControls(); |
| 230 caption_button_container_->UpdateSizeButtonVisibility(); |
| 231 |
| 232 Layout(); |
| 230 } | 233 } |
| 231 | 234 |
| 232 int CustomFrameViewAsh::HeaderView::GetPreferredOnScreenHeight() const { | 235 int CustomFrameViewAsh::HeaderView::GetPreferredOnScreenHeight() const { |
| 233 if (frame_->IsFullscreen()) { | 236 if (frame_->IsFullscreen()) { |
| 234 return static_cast<int>( | 237 return static_cast<int>( |
| 235 GetPreferredHeight() * fullscreen_visible_fraction_); | 238 GetPreferredHeight() * fullscreen_visible_fraction_); |
| 236 } | 239 } |
| 237 return GetPreferredHeight(); | 240 return GetPreferredHeight(); |
| 238 } | 241 } |
| 239 | 242 |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 FrameCaptionButtonContainerView* CustomFrameViewAsh:: | 571 FrameCaptionButtonContainerView* CustomFrameViewAsh:: |
| 569 GetFrameCaptionButtonContainerViewForTest() { | 572 GetFrameCaptionButtonContainerViewForTest() { |
| 570 return header_view_->caption_button_container(); | 573 return header_view_->caption_button_container(); |
| 571 } | 574 } |
| 572 | 575 |
| 573 int CustomFrameViewAsh::NonClientTopBorderHeight() const { | 576 int CustomFrameViewAsh::NonClientTopBorderHeight() const { |
| 574 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight(); | 577 return frame_->IsFullscreen() ? 0 : header_view_->GetPreferredHeight(); |
| 575 } | 578 } |
| 576 | 579 |
| 577 } // namespace ash | 580 } // namespace ash |
| OLD | NEW |