| 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/frame/caption_buttons/frame_caption_button_container_view.h
" | 10 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h
" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 if (browser_view()->initialized() && (child == caption_button_container_)) { | 353 if (browser_view()->initialized() && (child == caption_button_container_)) { |
| 354 InvalidateLayout(); | 354 InvalidateLayout(); |
| 355 frame()->GetRootView()->Layout(); | 355 frame()->GetRootView()->Layout(); |
| 356 } | 356 } |
| 357 } | 357 } |
| 358 | 358 |
| 359 /////////////////////////////////////////////////////////////////////////////// | 359 /////////////////////////////////////////////////////////////////////////////// |
| 360 // ash::ShellObserver: | 360 // ash::ShellObserver: |
| 361 | 361 |
| 362 void BrowserNonClientFrameViewAsh::OnOverviewModeStarting() { | 362 void BrowserNonClientFrameViewAsh::OnOverviewModeStarting() { |
| 363 frame()->GetNativeWindow()->SetProperty( |
| 364 aura::client::kTopViewColor, |
| 365 static_cast<int>(GetFrameColor())); |
| 363 if (ash::MaterialDesignController::IsOverviewMaterial()) | 366 if (ash::MaterialDesignController::IsOverviewMaterial()) |
| 364 caption_button_container_->SetVisible(false); | 367 caption_button_container_->SetVisible(false); |
| 365 } | 368 } |
| 366 | 369 |
| 367 void BrowserNonClientFrameViewAsh::OnOverviewModeEnded() { | 370 void BrowserNonClientFrameViewAsh::OnOverviewModeEnded() { |
| 368 if (ash::MaterialDesignController::IsOverviewMaterial()) | 371 if (ash::MaterialDesignController::IsOverviewMaterial()) |
| 369 caption_button_container_->SetVisible(true); | 372 caption_button_container_->SetVisible(true); |
| 370 } | 373 } |
| 371 | 374 |
| 372 void BrowserNonClientFrameViewAsh::OnMaximizeModeStarted() { | 375 void BrowserNonClientFrameViewAsh::OnMaximizeModeStarted() { |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 // TODO(pkasting): The "2 *" part of this makes no sense to me. | 564 // TODO(pkasting): The "2 *" part of this makes no sense to me. |
| 562 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, | 565 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, |
| 563 img_y, img_w, img_h); | 566 img_y, img_w, img_h); |
| 564 | 567 |
| 565 // Toolbar/content separator. | 568 // Toolbar/content separator. |
| 566 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, | 569 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, |
| 567 kClientEdgeThickness, 0); | 570 kClientEdgeThickness, 0); |
| 568 canvas->FillRect(toolbar_bounds, separator_color); | 571 canvas->FillRect(toolbar_bounds, separator_color); |
| 569 } | 572 } |
| 570 } | 573 } |
| OLD | NEW |