Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2334)

Unified Diff: ash/test/test_session_state_delegate.cc

Issue 200483004: Show avatar icon on V2 app's frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/test/test_session_state_delegate.cc
diff --git a/ash/test/test_session_state_delegate.cc b/ash/test/test_session_state_delegate.cc
index 722981f984e311dc49396bb51e464925a85b36f8..491408e32aac69d591b5bf9715c9c4dd6f10aed1 100644
--- a/ash/test/test_session_state_delegate.cc
+++ b/ash/test/test_session_state_delegate.cc
@@ -46,6 +46,12 @@ TestSessionStateDelegate::GetBrowserContextByIndex(
return NULL;
}
+content::BrowserContext*
+TestSessionStateDelegate::GetBrowserContextForWindow(
+ aura::Window* window) {
+ return NULL;
+}
+
int TestSessionStateDelegate::GetMaximumNumberOfLoggedInUsers() const {
return 3;
}
@@ -118,6 +124,11 @@ void TestSessionStateDelegate::SetUserAddingScreenRunning(
user_adding_screen_running_ = user_adding_screen_running;
}
+void TestSessionStateDelegate::SetUserImage(
+ const gfx::ImageSkia& user_image) {
+ user_image_ = user_image;
+}
+
const base::string16 TestSessionStateDelegate::GetUserDisplayName(
MultiProfileIndex index) const {
return base::UTF8ToUTF16("Über tray Über tray Über tray Über tray");
@@ -140,11 +151,11 @@ const std::string TestSessionStateDelegate::GetUserID(
const gfx::ImageSkia& TestSessionStateDelegate::GetUserImage(
content::BrowserContext* context) const {
- return null_image_;
+ return user_image_;
}
bool TestSessionStateDelegate::ShouldShowAvatar(aura::Window* window) {
- return false;
+ return !user_image_.isNull();
}
void TestSessionStateDelegate::SwitchActiveUser(const std::string& user_id) {

Powered by Google App Engine
This is Rietveld 408576698