| 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/ash_layout_constants.h" | 9 #include "ash/ash_layout_constants.h" |
| 10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" | 10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 int BrowserNonClientFrameViewAsh::GetThemeBackgroundXInset() const { | 164 int BrowserNonClientFrameViewAsh::GetThemeBackgroundXInset() const { |
| 165 return ash::HeaderPainterUtil::GetThemeBackgroundXInset(); | 165 return ash::HeaderPainterUtil::GetThemeBackgroundXInset(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 void BrowserNonClientFrameViewAsh::UpdateThrobber(bool running) { | 168 void BrowserNonClientFrameViewAsh::UpdateThrobber(bool running) { |
| 169 if (window_icon_) | 169 if (window_icon_) |
| 170 window_icon_->Update(); | 170 window_icon_->Update(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 void BrowserNonClientFrameViewAsh::UpdateMinimumSize() { |
| 174 gfx::Size min_size = GetMinimumSize(); |
| 175 aura::Window* frame_window = frame()->GetNativeWindow(); |
| 176 const gfx::Size* previous_min_size = |
| 177 frame_window->GetProperty(aura::client::kMinimumSize); |
| 178 if (!previous_min_size || *previous_min_size != min_size) { |
| 179 frame_window->SetProperty(aura::client::kMinimumSize, |
| 180 new gfx::Size(min_size)); |
| 181 } |
| 182 } |
| 183 |
| 173 /////////////////////////////////////////////////////////////////////////////// | 184 /////////////////////////////////////////////////////////////////////////////// |
| 174 // views::NonClientFrameView: | 185 // views::NonClientFrameView: |
| 175 | 186 |
| 176 gfx::Rect BrowserNonClientFrameViewAsh::GetBoundsForClientView() const { | 187 gfx::Rect BrowserNonClientFrameViewAsh::GetBoundsForClientView() const { |
| 177 // The ClientView must be flush with the top edge of the widget so that the | 188 // The ClientView must be flush with the top edge of the widget so that the |
| 178 // web contents can take up the entire screen in immersive fullscreen (with | 189 // web contents can take up the entire screen in immersive fullscreen (with |
| 179 // or without the top-of-window views revealed). When in immersive fullscreen | 190 // or without the top-of-window views revealed). When in immersive fullscreen |
| 180 // and the top-of-window views are revealed, the TopContainerView paints the | 191 // and the top-of-window views are revealed, the TopContainerView paints the |
| 181 // window header by redirecting paints from its background to | 192 // window header by redirecting paints from its background to |
| 182 // BrowserNonClientFrameViewAsh. | 193 // BrowserNonClientFrameViewAsh. |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 toolbar_bounds.width(), 0); | 458 toolbar_bounds.width(), 0); |
| 448 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), | 459 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), |
| 449 separator_rect, true); | 460 separator_rect, true); |
| 450 | 461 |
| 451 // Toolbar/content separator. | 462 // Toolbar/content separator. |
| 452 toolbar_bounds.Inset(kClientEdgeThickness, 0); | 463 toolbar_bounds.Inset(kClientEdgeThickness, 0); |
| 453 BrowserView::Paint1pxHorizontalLine( | 464 BrowserView::Paint1pxHorizontalLine( |
| 454 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), | 465 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), |
| 455 toolbar_bounds, true); | 466 toolbar_bounds, true); |
| 456 } | 467 } |
| OLD | NEW |