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

Unified Diff: chrome/browser/profiles/fake_profile_info_interface.cc

Issue 7647002: [Mac] Implement the avatar menu bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test Created 9 years, 4 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: chrome/browser/profiles/fake_profile_info_interface.cc
diff --git a/chrome/browser/profiles/fake_profile_info_interface.cc b/chrome/browser/profiles/fake_profile_info_interface.cc
new file mode 100644
index 0000000000000000000000000000000000000000..25466bc89eee2944dd25db775c721306adc03521
--- /dev/null
+++ b/chrome/browser/profiles/fake_profile_info_interface.cc
@@ -0,0 +1,43 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/profiles/fake_profile_info_interface.h"
+
+#include "grit/theme_resources.h"
+#include "ui/base/resource/resource_bundle.h"
+
+FakeProfileInfo::FakeProfileInfo() {}
+FakeProfileInfo::~FakeProfileInfo() {}
+
+std::vector<AvatarMenuModel::Item*>* FakeProfileInfo::mock_profiles() {
+ return &profiles_;
+}
+
+// static
+gfx::Image& FakeProfileInfo::GetTestImage() {
+ return ResourceBundle::GetSharedInstance().GetImageNamed(
+ IDR_PROFILE_AVATAR_0);
+}
+
+size_t FakeProfileInfo::GetNumberOfProfiles() const {
+ return profiles_.size();
+}
+
+size_t FakeProfileInfo::GetIndexOfProfileWithPath(
+ const FilePath& profile_path) const {
+ return std::string::npos;
+}
+
+string16 FakeProfileInfo::GetNameOfProfileAtIndex(size_t index) const {
+ return profiles_[index]->name;
+}
+
+FilePath FakeProfileInfo::GetPathOfProfileAtIndex(size_t index) const {
+ return FilePath();
+}
+
+const gfx::Image& FakeProfileInfo::GetAvatarIconOfProfileAtIndex(
+ size_t index) const {
+ return profiles_[index]->icon;
+}
« no previous file with comments | « chrome/browser/profiles/fake_profile_info_interface.h ('k') | chrome/browser/ui/cocoa/browser/avatar_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698