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 28 matching lines...) Expand all Loading... |
39 | 39 |
40 void HeaderView::SchedulePaintForTitle() { | 40 void HeaderView::SchedulePaintForTitle() { |
41 header_painter_->SchedulePaintForTitle(); | 41 header_painter_->SchedulePaintForTitle(); |
42 } | 42 } |
43 | 43 |
44 void HeaderView::ResetWindowControls() { | 44 void HeaderView::ResetWindowControls() { |
45 caption_button_container_->ResetWindowControls(); | 45 caption_button_container_->ResetWindowControls(); |
46 } | 46 } |
47 | 47 |
48 int HeaderView::GetPreferredOnScreenHeight() const { | 48 int HeaderView::GetPreferredOnScreenHeight() const { |
49 if (target_widget_->IsFullscreen()) { | 49 if (is_immersive_delegate_ && target_widget_->IsFullscreen()) { |
50 return static_cast<int>(GetPreferredHeight() * | 50 return static_cast<int>(GetPreferredHeight() * |
51 fullscreen_visible_fraction_); | 51 fullscreen_visible_fraction_); |
52 } | 52 } |
53 return GetPreferredHeight(); | 53 return GetPreferredHeight(); |
54 } | 54 } |
55 | 55 |
56 int HeaderView::GetPreferredHeight() const { | 56 int HeaderView::GetPreferredHeight() const { |
57 return header_painter_->GetHeaderHeightForPainting(); | 57 return header_painter_->GetHeaderHeightForPainting(); |
58 } | 58 } |
59 | 59 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 gfx::Rect visible_bounds(GetVisibleBounds()); | 184 gfx::Rect visible_bounds(GetVisibleBounds()); |
185 gfx::Point visible_origin_in_screen(visible_bounds.origin()); | 185 gfx::Point visible_origin_in_screen(visible_bounds.origin()); |
186 views::View::ConvertPointToScreen(this, &visible_origin_in_screen); | 186 views::View::ConvertPointToScreen(this, &visible_origin_in_screen); |
187 std::vector<gfx::Rect> bounds_in_screen; | 187 std::vector<gfx::Rect> bounds_in_screen; |
188 bounds_in_screen.push_back( | 188 bounds_in_screen.push_back( |
189 gfx::Rect(visible_origin_in_screen, visible_bounds.size())); | 189 gfx::Rect(visible_origin_in_screen, visible_bounds.size())); |
190 return bounds_in_screen; | 190 return bounds_in_screen; |
191 } | 191 } |
192 | 192 |
193 } // namespace ash | 193 } // namespace ash |
OLD | NEW |