OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/header_view.h" | 5 #include "ash/common/frame/header_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/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 caption_button_container_->ResetWindowControls(); | 87 caption_button_container_->ResetWindowControls(); |
88 caption_button_container_->UpdateSizeButtonVisibility(); | 88 caption_button_container_->UpdateSizeButtonVisibility(); |
89 Layout(); | 89 Layout(); |
90 } | 90 } |
91 | 91 |
92 void HeaderView::SetFrameColors(SkColor active_frame_color, | 92 void HeaderView::SetFrameColors(SkColor active_frame_color, |
93 SkColor inactive_frame_color) { | 93 SkColor inactive_frame_color) { |
94 header_painter_->SetFrameColors(active_frame_color, inactive_frame_color); | 94 header_painter_->SetFrameColors(active_frame_color, inactive_frame_color); |
95 } | 95 } |
96 | 96 |
97 SkColor HeaderView::GetActiveFrameColor() const { | |
98 return header_painter_->GetActiveFrameColor(); | |
99 } | |
100 | |
101 SkColor HeaderView::GetInactiveFrameColor() const { | |
102 return header_painter_->GetInactiveFrameColor(); | |
103 } | |
104 | |
105 /////////////////////////////////////////////////////////////////////////////// | 97 /////////////////////////////////////////////////////////////////////////////// |
106 // HeaderView, views::View overrides: | 98 // HeaderView, views::View overrides: |
107 | 99 |
108 void HeaderView::Layout() { | 100 void HeaderView::Layout() { |
109 header_painter_->LayoutHeader(); | 101 header_painter_->LayoutHeader(); |
110 } | 102 } |
111 | 103 |
112 void HeaderView::OnPaint(gfx::Canvas* canvas) { | 104 void HeaderView::OnPaint(gfx::Canvas* canvas) { |
113 bool paint_as_active = | 105 bool paint_as_active = |
114 target_widget_->non_client_view()->frame_view()->ShouldPaintAsActive(); | 106 target_widget_->non_client_view()->frame_view()->ShouldPaintAsActive(); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 gfx::Rect visible_bounds(GetVisibleBounds()); | 184 gfx::Rect visible_bounds(GetVisibleBounds()); |
193 gfx::Point visible_origin_in_screen(visible_bounds.origin()); | 185 gfx::Point visible_origin_in_screen(visible_bounds.origin()); |
194 views::View::ConvertPointToScreen(this, &visible_origin_in_screen); | 186 views::View::ConvertPointToScreen(this, &visible_origin_in_screen); |
195 std::vector<gfx::Rect> bounds_in_screen; | 187 std::vector<gfx::Rect> bounds_in_screen; |
196 bounds_in_screen.push_back( | 188 bounds_in_screen.push_back( |
197 gfx::Rect(visible_origin_in_screen, visible_bounds.size())); | 189 gfx::Rect(visible_origin_in_screen, visible_bounds.size())); |
198 return bounds_in_screen; | 190 return bounds_in_screen; |
199 } | 191 } |
200 | 192 |
201 } // namespace ash | 193 } // namespace ash |
OLD | NEW |