| 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/common/material_design/material_design_controller.h" | 10 #include "ash/common/material_design/material_design_controller.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 views::WidgetDelegate* delegate = frame()->widget_delegate(); | 390 views::WidgetDelegate* delegate = frame()->widget_delegate(); |
| 391 return delegate ? delegate->GetWindowIcon() : gfx::ImageSkia(); | 391 return delegate ? delegate->GetWindowIcon() : gfx::ImageSkia(); |
| 392 } | 392 } |
| 393 | 393 |
| 394 /////////////////////////////////////////////////////////////////////////////// | 394 /////////////////////////////////////////////////////////////////////////////// |
| 395 // BrowserNonClientFrameViewAsh, protected: | 395 // BrowserNonClientFrameViewAsh, protected: |
| 396 | 396 |
| 397 // BrowserNonClientFrameView: | 397 // BrowserNonClientFrameView: |
| 398 void BrowserNonClientFrameViewAsh::UpdateProfileIcons() { | 398 void BrowserNonClientFrameViewAsh::UpdateProfileIcons() { |
| 399 Browser* browser = browser_view()->browser(); | 399 Browser* browser = browser_view()->browser(); |
| 400 if ((browser->is_type_tabbed() || browser->is_app()) && | 400 if (!browser->is_type_tabbed() && !browser->is_app()) |
| 401 return; |
| 402 if ((browser->profile()->GetProfileType() == Profile::INCOGNITO_PROFILE) || |
| 401 chrome::MultiUserWindowManager::ShouldShowAvatar( | 403 chrome::MultiUserWindowManager::ShouldShowAvatar( |
| 402 browser_view()->GetNativeWindow())) { | 404 browser_view()->GetNativeWindow())) { |
| 403 UpdateProfileIndicatorIcon(); | 405 UpdateProfileIndicatorIcon(); |
| 404 } | 406 } |
| 405 } | 407 } |
| 406 | 408 |
| 407 /////////////////////////////////////////////////////////////////////////////// | 409 /////////////////////////////////////////////////////////////////////////////// |
| 408 // BrowserNonClientFrameViewAsh, private: | 410 // BrowserNonClientFrameViewAsh, private: |
| 409 | 411 |
| 410 // views::NonClientFrameView: | 412 // views::NonClientFrameView: |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 // TODO(pkasting): The "2 *" part of this makes no sense to me. | 585 // TODO(pkasting): The "2 *" part of this makes no sense to me. |
| 584 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, | 586 canvas->TileImageInt(*right, 0, 0, w - (2 * kClientEdgeThickness) - img_w, |
| 585 img_y, img_w, img_h); | 587 img_y, img_w, img_h); |
| 586 | 588 |
| 587 // Toolbar/content separator. | 589 // Toolbar/content separator. |
| 588 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, | 590 toolbar_bounds.Inset(kClientEdgeThickness, h - kClientEdgeThickness, |
| 589 kClientEdgeThickness, 0); | 591 kClientEdgeThickness, 0); |
| 590 canvas->FillRect(toolbar_bounds, separator_color); | 592 canvas->FillRect(toolbar_bounds, separator_color); |
| 591 } | 593 } |
| 592 } | 594 } |
| OLD | NEW |