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

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

Issue 2277563002: Wires up immersive mode for chrome and mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix crash 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698