| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_mus.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "chrome/browser/profiles/profiles_state.h" | 9 #include "chrome/browser/profiles/profiles_state.h" |
| 10 #include "chrome/browser/themes/theme_properties.h" | 10 #include "chrome/browser/themes/theme_properties.h" |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // BrowserNonClientFrameViewMus, protected: | 361 // BrowserNonClientFrameViewMus, protected: |
| 362 | 362 |
| 363 // BrowserNonClientFrameView: | 363 // BrowserNonClientFrameView: |
| 364 void BrowserNonClientFrameViewMus::UpdateProfileIcons() { | 364 void BrowserNonClientFrameViewMus::UpdateProfileIcons() { |
| 365 #if defined(FRAME_AVATAR_BUTTON) | 365 #if defined(FRAME_AVATAR_BUTTON) |
| 366 if (browser_view()->IsRegularOrGuestSession()) { | 366 if (browser_view()->IsRegularOrGuestSession()) { |
| 367 profile_switcher_.Update(AvatarButtonStyle::NATIVE); | 367 profile_switcher_.Update(AvatarButtonStyle::NATIVE); |
| 368 return; | 368 return; |
| 369 } | 369 } |
| 370 #endif | 370 #endif |
| 371 Browser* browser = browser_view()->browser(); |
| 372 |
| 373 // Similar logic as in BrowserNonClientFrameViewAsh::UpdateProfileIcons (minus |
| 374 // the multi-profile part). That is, no profile indicator for non-tabbed and |
| 375 // non-app browser window, or regular/guest user browser window. |
| 376 if (!browser->is_type_tabbed() && !browser->is_app()) |
| 377 return; |
| 378 if (browser_view()->IsRegularOrGuestSession()) |
| 379 return; |
| 380 |
| 371 UpdateProfileIndicatorIcon(); | 381 UpdateProfileIndicatorIcon(); |
| 372 } | 382 } |
| 373 | 383 |
| 374 /////////////////////////////////////////////////////////////////////////////// | 384 /////////////////////////////////////////////////////////////////////////////// |
| 375 // BrowserNonClientFrameViewMus, private: | 385 // BrowserNonClientFrameViewMus, private: |
| 376 | 386 |
| 377 void BrowserNonClientFrameViewMus::TabStripMaxXChanged(TabStrip* tab_strip) { | 387 void BrowserNonClientFrameViewMus::TabStripMaxXChanged(TabStrip* tab_strip) { |
| 378 UpdateClientArea(); | 388 UpdateClientArea(); |
| 379 } | 389 } |
| 380 | 390 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 // TODO: move ash_layout_constants to ash/public/cpp. | 517 // TODO: move ash_layout_constants to ash/public/cpp. |
| 508 const bool restored = !frame()->IsMaximized() && !frame()->IsFullscreen(); | 518 const bool restored = !frame()->IsMaximized() && !frame()->IsFullscreen(); |
| 509 return GetAshLayoutSize(restored | 519 return GetAshLayoutSize(restored |
| 510 ? AshLayoutSize::BROWSER_RESTORED_CAPTION_BUTTON | 520 ? AshLayoutSize::BROWSER_RESTORED_CAPTION_BUTTON |
| 511 : AshLayoutSize::BROWSER_MAXIMIZED_CAPTION_BUTTON) | 521 : AshLayoutSize::BROWSER_MAXIMIZED_CAPTION_BUTTON) |
| 512 .height(); | 522 .height(); |
| 513 #else | 523 #else |
| 514 return views::WindowManagerFrameValues::instance().normal_insets.top(); | 524 return views::WindowManagerFrameValues::instance().normal_insets.top(); |
| 515 #endif | 525 #endif |
| 516 } | 526 } |
| OLD | NEW |