| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/common/ash_layout_constants.h" | 9 #include "ash/common/ash_layout_constants.h" |
| 10 #include "ash/common/material_design/material_design_controller.h" | 10 #include "ash/common/material_design/material_design_controller.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 void BrowserNonClientFrameViewAsh::GetWindowMask(const gfx::Size& size, | 241 void BrowserNonClientFrameViewAsh::GetWindowMask(const gfx::Size& size, |
| 242 gfx::Path* window_mask) { | 242 gfx::Path* window_mask) { |
| 243 // Aura does not use window masks. | 243 // Aura does not use window masks. |
| 244 } | 244 } |
| 245 | 245 |
| 246 void BrowserNonClientFrameViewAsh::ResetWindowControls() { | 246 void BrowserNonClientFrameViewAsh::ResetWindowControls() { |
| 247 // Hide the caption buttons in immersive fullscreen when the tab light bar | 247 // Hide the caption buttons in immersive fullscreen when the tab light bar |
| 248 // is visible because it's confusing when the user hovers or clicks in the | 248 // is visible because it's confusing when the user hovers or clicks in the |
| 249 // top-right of the screen and hits one. | 249 // top-right of the screen and hits one. |
| 250 // TODO(yiyix): Update |caption_button_container_|'s visibility calculation |
| 251 // when Chrome OS MD is enabled by default. |
| 250 caption_button_container_->SetVisible(!UseImmersiveLightbarHeaderStyle()); | 252 caption_button_container_->SetVisible(!UseImmersiveLightbarHeaderStyle()); |
| 251 caption_button_container_->ResetWindowControls(); | 253 caption_button_container_->ResetWindowControls(); |
| 252 } | 254 } |
| 253 | 255 |
| 254 void BrowserNonClientFrameViewAsh::UpdateWindowIcon() { | 256 void BrowserNonClientFrameViewAsh::UpdateWindowIcon() { |
| 255 if (window_icon_) | 257 if (window_icon_) |
| 256 window_icon_->SchedulePaint(); | 258 window_icon_->SchedulePaint(); |
| 257 } | 259 } |
| 258 | 260 |
| 259 void BrowserNonClientFrameViewAsh::UpdateWindowTitle() { | 261 void BrowserNonClientFrameViewAsh::UpdateWindowTitle() { |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 // TODO(pkasting): The "2 *" part of this makes no sense to me. | 587 // TODO(pkasting): The "2 *" part of this makes no sense to me. |
| 586 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, | 588 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, |
| 587 img_y, img_w, img_h); | 589 img_y, img_w, img_h); |
| 588 | 590 |
| 589 // Toolbar/content separator. | 591 // Toolbar/content separator. |
| 590 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, | 592 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, |
| 591 kClientEdgeThickness, 0); | 593 kClientEdgeThickness, 0); |
| 592 canvas->FillRect(toolbar_bounds, separator_color); | 594 canvas->FillRect(toolbar_bounds, separator_color); |
| 593 } | 595 } |
| 594 } | 596 } |
| OLD | NEW |