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

Side by Side Diff: ash/wm/panels/panel_frame_view.cc

Issue 2329433003: Revert of [ash-md] Fades overview header in and out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/wm/panels/panel_frame_view.h" 5 #include "ash/wm/panels/panel_frame_view.h"
6 6
7 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h " 7 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h "
8 #include "ash/common/frame/default_header_painter.h" 8 #include "ash/common/frame/default_header_painter.h"
9 #include "ash/common/frame/frame_border_hit_test.h" 9 #include "ash/common/frame/frame_border_hit_test.h"
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 23 matching lines...) Expand all
34 WmShell::Get()->AddShellObserver(this); 34 WmShell::Get()->AddShellObserver(this);
35 } 35 }
36 36
37 PanelFrameView::~PanelFrameView() { 37 PanelFrameView::~PanelFrameView() {
38 WmShell::Get()->RemoveShellObserver(this); 38 WmShell::Get()->RemoveShellObserver(this);
39 } 39 }
40 40
41 void PanelFrameView::SetFrameColors(SkColor active_frame_color, 41 void PanelFrameView::SetFrameColors(SkColor active_frame_color,
42 SkColor inactive_frame_color) { 42 SkColor inactive_frame_color) {
43 header_painter_->SetFrameColors(active_frame_color, inactive_frame_color); 43 header_painter_->SetFrameColors(active_frame_color, inactive_frame_color);
44 frame_->GetNativeWindow()->SetProperty(
45 aura::client::kTopViewColor, header_painter_->GetInactiveFrameColor());
46 } 44 }
47 45
48 const char* PanelFrameView::GetClassName() const { 46 const char* PanelFrameView::GetClassName() const {
49 return kViewClassName; 47 return kViewClassName;
50 } 48 }
51 49
52 void PanelFrameView::InitHeaderPainter() { 50 void PanelFrameView::InitHeaderPainter() {
53 header_painter_.reset(new DefaultHeaderPainter); 51 header_painter_.reset(new DefaultHeaderPainter);
54 frame_->GetNativeWindow()->SetProperty(
55 aura::client::kTopViewColor, header_painter_->GetInactiveFrameColor());
56 52
57 caption_button_container_ = new FrameCaptionButtonContainerView(frame_); 53 caption_button_container_ = new FrameCaptionButtonContainerView(frame_);
58 AddChildView(caption_button_container_); 54 AddChildView(caption_button_container_);
59 55
60 header_painter_->Init(frame_, this, caption_button_container_); 56 header_painter_->Init(frame_, this, caption_button_container_);
61 57
62 if (frame_->widget_delegate()->ShouldShowWindowIcon()) { 58 if (frame_->widget_delegate()->ShouldShowWindowIcon()) {
63 window_icon_ = new views::ImageView(); 59 window_icon_ = new views::ImageView();
64 AddChildView(window_icon_); 60 AddChildView(window_icon_);
65 header_painter_->UpdateLeftHeaderView(window_icon_); 61 header_painter_->UpdateLeftHeaderView(window_icon_);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if (ash::MaterialDesignController::IsOverviewMaterial()) 148 if (ash::MaterialDesignController::IsOverviewMaterial())
153 caption_button_container_->SetVisible(false); 149 caption_button_container_->SetVisible(false);
154 } 150 }
155 151
156 void PanelFrameView::OnOverviewModeEnded() { 152 void PanelFrameView::OnOverviewModeEnded() {
157 if (ash::MaterialDesignController::IsOverviewMaterial()) 153 if (ash::MaterialDesignController::IsOverviewMaterial())
158 caption_button_container_->SetVisible(true); 154 caption_button_container_->SetVisible(true);
159 } 155 }
160 156
161 } // namespace ash 157 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector_unittest.cc ('k') | chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698