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

Side by Side Diff: chrome/browser/autocomplete/contact_provider_chromeos.h

Issue 10542076: ABANDONED: chromeos: Download contacts (work in progress). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor changes Created 8 years, 5 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) 2012 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_CONTACT_PROVIDER_CHROMEOS_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_CONTACT_PROVIDER_CHROMEOS_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/autocomplete/autocomplete_provider.h"
13 #include "chrome/browser/chromeos/contacts/contact_manager_observer.h"
14
15 class AutocompleteInput;
16
17 namespace contacts {
18 class ContactManager;
19 }
20
21 class ContactProvider : public AutocompleteProvider,
22 public contacts::ContactManagerObserver {
23 public:
24 ContactProvider(AutocompleteProviderListener* listener, Profile* profile);
25
26 // AutocompleteProvider overrides:
27 virtual void Start(const AutocompleteInput& input,
28 bool minimal_changes) OVERRIDE;
29
30 // contacts::ContactManagerObserver overrides:
31 virtual void OnContactsUpdated(contacts::ContactManager* manager) OVERRIDE;
32
33 private:
34 struct ContactData {
35 ContactData(const std::string& name, const std::string& provider_id);
36
37 // Name used for matching.
38 std::string name;
39
40 // Unique ID ("provider" here refers to the original provider of the contact
41 // data, not this ContactProvider class).
42 std::string provider_id;
43 };
44 typedef std::vector<ContactData> ContactDataVector;
45
46 virtual ~ContactProvider();
47
48 void RefreshContacts(contacts::ContactManager* manager);
49
50 // Contacts that we'll search through.
51 ContactDataVector contacts_;
52
53 DISALLOW_COPY_AND_ASSIGN(ContactProvider);
54 };
55
56 #endif // CHROME_BROWSER_AUTOCOMPLETE_CONTACT_PROVIDER_CHROMEOS_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_match.cc ('k') | chrome/browser/autocomplete/contact_provider_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698