Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: ash/frame/custom_frame_view_ash.cc

Issue 554183002: Update the maximize button when size constraints change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698