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

Side by Side Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc

Issue 2129213003: [ash-md] Hides frame headers in overview mode not using a mask (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // size changes. 347 // size changes.
348 if (browser_view()->initialized() && (child == caption_button_container_)) { 348 if (browser_view()->initialized() && (child == caption_button_container_)) {
349 InvalidateLayout(); 349 InvalidateLayout();
350 frame()->GetRootView()->Layout(); 350 frame()->GetRootView()->Layout();
351 } 351 }
352 } 352 }
353 353
354 /////////////////////////////////////////////////////////////////////////////// 354 ///////////////////////////////////////////////////////////////////////////////
355 // ash::ShellObserver: 355 // ash::ShellObserver:
356 356
357 void BrowserNonClientFrameViewAsh::OnOverviewModeStarting() { 357 void BrowserNonClientFrameViewAsh::OnOverviewModeStarting() {
tdanderson 2016/07/08 18:51:55 As a side question, why aren't we making any MD ch
varkha 2016/07/08 19:27:41 Good question, I will follow up with sky if it is
358 if (ash::MaterialDesignController::IsOverviewMaterial()) 358 if (!ash::MaterialDesignController::IsOverviewMaterial())
359 return;
360 if (browser_view()->IsTabStripVisible())
359 caption_button_container_->SetVisible(false); 361 caption_button_container_->SetVisible(false);
362 else
363 SetVisible(false);
tdanderson 2016/07/08 18:51:55 Correct me if I'm mistaken, but isn't this setting
varkha 2016/07/08 19:27:41 For ash browser frame this is the only visible por
360 } 364 }
361 365
362 void BrowserNonClientFrameViewAsh::OnOverviewModeEnded() { 366 void BrowserNonClientFrameViewAsh::OnOverviewModeEnded() {
363 if (ash::MaterialDesignController::IsOverviewMaterial()) 367 if (!ash::MaterialDesignController::IsOverviewMaterial())
368 return;
369 if (browser_view()->IsTabStripVisible())
364 caption_button_container_->SetVisible(true); 370 caption_button_container_->SetVisible(true);
371 else
372 SetVisible(true);
365 } 373 }
366 374
367 void BrowserNonClientFrameViewAsh::OnMaximizeModeStarted() { 375 void BrowserNonClientFrameViewAsh::OnMaximizeModeStarted() {
368 caption_button_container_->UpdateSizeButtonVisibility(); 376 caption_button_container_->UpdateSizeButtonVisibility();
369 InvalidateLayout(); 377 InvalidateLayout();
370 frame()->client_view()->InvalidateLayout(); 378 frame()->client_view()->InvalidateLayout();
371 frame()->GetRootView()->Layout(); 379 frame()->GetRootView()->Layout();
372 } 380 }
373 381
374 void BrowserNonClientFrameViewAsh::OnMaximizeModeEnded() { 382 void BrowserNonClientFrameViewAsh::OnMaximizeModeEnded() {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 // TODO(pkasting): The "2 *" part of this makes no sense to me. 593 // TODO(pkasting): The "2 *" part of this makes no sense to me.
586 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, 594 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w,
587 img_y, img_w, img_h); 595 img_y, img_w, img_h);
588 596
589 // Toolbar/content separator. 597 // Toolbar/content separator.
590 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, 598 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness,
591 kClientEdgeThickness, 0); 599 kClientEdgeThickness, 0);
592 canvas->FillRect(toolbar_bounds, separator_color); 600 canvas->FillRect(toolbar_bounds, separator_color);
593 } 601 }
594 } 602 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698