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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/profiles/fake_profile_info_interface.h"
6
7 #include "grit/theme_resources.h"
8 #include "ui/base/resource/resource_bundle.h"
9
10 FakeProfileInfo::FakeProfileInfo() {}
11 FakeProfileInfo::~FakeProfileInfo() {}
12
13 std::vector<AvatarMenuModel::Item*>* FakeProfileInfo::mock_profiles() {
14 return &profiles_;
15 }
16
17 // static
18 gfx::Image& FakeProfileInfo::GetTestImage() {
19 return ResourceBundle::GetSharedInstance().GetImageNamed(
20 IDR_PROFILE_AVATAR_0);
21 }
22
23 size_t FakeProfileInfo::GetNumberOfProfiles() const {
24 return profiles_.size();
25 }
26
27 size_t FakeProfileInfo::GetIndexOfProfileWithPath(
28 const FilePath& profile_path) const {
29 return std::string::npos;
30 }
31
32 string16 FakeProfileInfo::GetNameOfProfileAtIndex(size_t index) const {
33 return profiles_[index]->name;
34 }
35
36 FilePath FakeProfileInfo::GetPathOfProfileAtIndex(size_t index) const {
37 return FilePath();
38 }
39
40 const gfx::Image& FakeProfileInfo::GetAvatarIconOfProfileAtIndex(
41 size_t index) const {
42 return profiles_[index]->icon;
43 }
OLDNEW
« 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