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_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
575 otr_resource_id = IDR_OTR_ICON_FULLSCREEN; | 575 otr_resource_id = IDR_OTR_ICON_FULLSCREEN; |
576 #if defined(OS_WIN) | 576 #if defined(OS_WIN) |
577 if (win8::IsSingleWindowMetroMode()) | 577 if (win8::IsSingleWindowMetroMode()) |
578 otr_resource_id = IDR_OTR_ICON_FULLSCREEN; | 578 otr_resource_id = IDR_OTR_ICON_FULLSCREEN; |
579 #endif | 579 #endif |
580 } | 580 } |
581 | 581 |
582 return otr_resource_id; | 582 return otr_resource_id; |
583 } | 583 } |
584 | 584 |
585 int BrowserView::GetGuestIconResourceID() const { | 585 int BrowserView::GetGuestIconResourceID() const { |
msw
2014/04/04 20:52:49
nit: remove this function, inline the contents at
Mike Lerman
2014/04/04 21:09:07
Done.
| |
586 return IDR_LOGIN_GUEST; | 586 return ProfileInfoCache::GetPlaceholderAvatarIconResourceID(); |
587 } | 587 } |
588 | 588 |
589 bool BrowserView::ShouldShowAvatar() const { | 589 bool BrowserView::ShouldShowAvatar() const { |
590 #if defined(OS_CHROMEOS) | 590 #if defined(OS_CHROMEOS) |
591 if (!browser_->is_type_tabbed() && !browser_->is_app()) | 591 if (!browser_->is_type_tabbed() && !browser_->is_app()) |
592 return false; | 592 return false; |
593 // Don't show incognito avatar in the guest session. | 593 // Don't show incognito avatar in the guest session. |
594 if (IsOffTheRecord() && !IsGuestSession()) | 594 if (IsOffTheRecord() && !IsGuestSession()) |
595 return true; | 595 return true; |
596 // This function is called via BrowserNonClientFrameView::UpdateAvatarInfo | 596 // This function is called via BrowserNonClientFrameView::UpdateAvatarInfo |
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2585 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2585 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2586 gfx::Point icon_bottom( | 2586 gfx::Point icon_bottom( |
2587 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2587 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2588 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2588 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2589 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2589 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2590 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2590 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2591 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2591 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2592 } | 2592 } |
2593 return top_arrow_height; | 2593 return top_arrow_height; |
2594 } | 2594 } |
OLD | NEW |