| 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(aura::client::kTopViewColor, | |
| 364 GetFrameColor()); | |
| 365 if (ash::MaterialDesignController::IsOverviewMaterial()) | 363 if (ash::MaterialDesignController::IsOverviewMaterial()) |
| 366 caption_button_container_->SetVisible(false); | 364 caption_button_container_->SetVisible(false); |
| 367 } | 365 } |
| 368 | 366 |
| 369 void BrowserNonClientFrameViewAsh::OnOverviewModeEnded() { | 367 void BrowserNonClientFrameViewAsh::OnOverviewModeEnded() { |
| 370 if (ash::MaterialDesignController::IsOverviewMaterial()) | 368 if (ash::MaterialDesignController::IsOverviewMaterial()) |
| 371 caption_button_container_->SetVisible(true); | 369 caption_button_container_->SetVisible(true); |
| 372 } | 370 } |
| 373 | 371 |
| 374 void BrowserNonClientFrameViewAsh::OnMaximizeModeStarted() { | 372 void BrowserNonClientFrameViewAsh::OnMaximizeModeStarted() { |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 // TODO(pkasting): The "2 *" part of this makes no sense to me. | 561 // TODO(pkasting): The "2 *" part of this makes no sense to me. |
| 564 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, | 562 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, |
| 565 img_y, img_w, img_h); | 563 img_y, img_w, img_h); |
| 566 | 564 |
| 567 // Toolbar/content separator. | 565 // Toolbar/content separator. |
| 568 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, | 566 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, |
| 569 kClientEdgeThickness, 0); | 567 kClientEdgeThickness, 0); |
| 570 canvas->FillRect(toolbar_bounds, separator_color); | 568 canvas->FillRect(toolbar_bounds, separator_color); |
| 571 } | 569 } |
| 572 } | 570 } |
| OLD | NEW |