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