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

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

Issue 2227643003: Converts mash to use the common non-client frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_widget_mus_fix
Patch Set: feedback Created 4 years, 4 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
« no previous file with comments | « ash/common/frame/custom_frame_view_ash.h ('k') | ash/common/frame/header_painter_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « ash/common/frame/custom_frame_view_ash.h ('k') | ash/common/frame/header_painter_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698