| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 // TODO(pkasting): The "2 *" part of this makes no sense to me. | 592 // TODO(pkasting): The "2 *" part of this makes no sense to me. |
| 590 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, | 593 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, |
| 591 img_y, img_w, img_h); | 594 img_y, img_w, img_h); |
| 592 | 595 |
| 593 // Toolbar/content separator. | 596 // Toolbar/content separator. |
| 594 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, | 597 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, |
| 595 kClientEdgeThickness, 0); | 598 kClientEdgeThickness, 0); |
| 596 canvas->FillRect(toolbar_bounds, separator_color); | 599 canvas->FillRect(toolbar_bounds, separator_color); |
| 597 } | 600 } |
| 598 } | 601 } |
| OLD | NEW |