Chromium Code Reviews| 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 when Chrome OS | |
|
msw
2016/07/20 20:06:50
nit: |caption_button_container_|'s
msw
2016/07/20 20:06:50
q: Could you add MD-specific behavior now and avoi
yiyix
2016/07/21 18:32:35
Done.
yiyix
2016/07/21 18:32:35
As we have discussed offline, there is no behavior
| |
| 251 // MD is enabled by default because it is currently dependent on | |
| 252 // |use_tab_indicators_| which is deprecated in MD. | |
| 250 caption_button_container_->SetVisible(!UseImmersiveLightbarHeaderStyle()); | 253 caption_button_container_->SetVisible(!UseImmersiveLightbarHeaderStyle()); |
| 251 caption_button_container_->ResetWindowControls(); | 254 caption_button_container_->ResetWindowControls(); |
| 252 } | 255 } |
| 253 | 256 |
| 254 void BrowserNonClientFrameViewAsh::UpdateWindowIcon() { | 257 void BrowserNonClientFrameViewAsh::UpdateWindowIcon() { |
| 255 if (window_icon_) | 258 if (window_icon_) |
| 256 window_icon_->SchedulePaint(); | 259 window_icon_->SchedulePaint(); |
| 257 } | 260 } |
| 258 | 261 |
| 259 void BrowserNonClientFrameViewAsh::UpdateWindowTitle() { | 262 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. | 588 // TODO(pkasting): The "2 *" part of this makes no sense to me. |
| 586 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, | 589 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, |
| 587 img_y, img_w, img_h); | 590 img_y, img_w, img_h); |
| 588 | 591 |
| 589 // Toolbar/content separator. | 592 // Toolbar/content separator. |
| 590 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, | 593 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, |
| 591 kClientEdgeThickness, 0); | 594 kClientEdgeThickness, 0); |
| 592 canvas->FillRect(toolbar_bounds, separator_color); | 595 canvas->FillRect(toolbar_bounds, separator_color); |
| 593 } | 596 } |
| 594 } | 597 } |
| OLD | NEW |