summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/frame/browser_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/views/frame/browser_view.cc')
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 3faef74..f802830 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -459,6 +459,10 @@ bool BrowserView::IsOffTheRecord() const {
return browser_->profile()->IsOffTheRecord();
}
+bool BrowserView::IsGuestSession() const {
+ return browser_->profile()->IsGuestSession();
+}
+
bool BrowserView::ShouldShowAvatar() const {
if (!IsBrowserTypeNormal())
return false;
@@ -545,7 +549,7 @@ TabContentsWrapper* BrowserView::GetSelectedTabContentsWrapper() const {
return browser_->GetSelectedTabContentsWrapper();
}
-SkBitmap BrowserView::GetOTRAvatarIcon() {
+SkBitmap BrowserView::GetOTRAvatarIcon() const {
static SkBitmap* otr_avatar_ = new SkBitmap();
if (otr_avatar_->isNull()) {
@@ -555,6 +559,21 @@ SkBitmap BrowserView::GetOTRAvatarIcon() {
return *otr_avatar_;
}
+SkBitmap BrowserView::GetGuestAvatarIcon() const {
+#if defined(OS_CHROMEOS)
+ static SkBitmap* guest_avatar_ = new SkBitmap();
+
+ if (guest_avatar_->isNull()) {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ *guest_avatar_ = *rb.GetBitmapNamed(IDR_GUEST_ICON);
+ }
+ return *guest_avatar_;
+#else
+ NOTREACHED();
+ return SkBitmap();
+#endif
+}
+
#if defined(OS_WIN) && !defined(USE_AURA)
void BrowserView::PrepareToRunSystemMenu(HMENU menu) {
system_menu_->UpdateStates();