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

Side by Side Diff: chrome/browser/local_discovery/privetv3_session.h

Issue 1106183006: Added gcdPrivate.getDeviceInfo function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_establish
Patch Set: Mon Apr 27 22:56:49 PDT 2015 Created 5 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SESSION_H_ 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SESSION_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SESSION_H_ 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SESSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 21 matching lines...) Expand all
32 // Manages secure communication between browser and local Privet device. 32 // Manages secure communication between browser and local Privet device.
33 class PrivetV3Session { 33 class PrivetV3Session {
34 private: 34 private:
35 class FetcherDelegate; 35 class FetcherDelegate;
36 36
37 public: 37 public:
38 typedef extensions::api::gcd_private::PairingType PairingType; 38 typedef extensions::api::gcd_private::PairingType PairingType;
39 typedef extensions::api::gcd_private::Status Result; 39 typedef extensions::api::gcd_private::Status Result;
40 40
41 typedef base::Callback< 41 typedef base::Callback<
42 void(Result result, const std::vector<PairingType>& types)> InitCallback; 42 void(Result result, const base::DictionaryValue& response)> InitCallback;
43 43
44 typedef base::Callback<void(Result result)> ResultCallback; 44 typedef base::Callback<void(Result result)> ResultCallback;
45 typedef base::Callback<void(Result result, 45 typedef base::Callback<void(Result result,
46 const base::DictionaryValue& response)> 46 const base::DictionaryValue& response)>
47 MessageCallback; 47 MessageCallback;
48 48
49 explicit PrivetV3Session(scoped_ptr<PrivetHTTPClient> client); 49 explicit PrivetV3Session(scoped_ptr<PrivetHTTPClient> client);
50 ~PrivetV3Session(); 50 ~PrivetV3Session();
51 51
52 // Initializes session. Queries /privet/info and returns supported pairing 52 // Initializes session. Queries /privet/info and returns supported pairing
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Intercepts POST requests. Used by tests only. 117 // Intercepts POST requests. Used by tests only.
118 base::Callback<void(const base::DictionaryValue&)> on_post_data_; 118 base::Callback<void(const base::DictionaryValue&)> on_post_data_;
119 119
120 base::WeakPtrFactory<PrivetV3Session> weak_ptr_factory_; 120 base::WeakPtrFactory<PrivetV3Session> weak_ptr_factory_;
121 DISALLOW_COPY_AND_ASSIGN(PrivetV3Session); 121 DISALLOW_COPY_AND_ASSIGN(PrivetV3Session);
122 }; 122 };
123 123
124 } // namespace local_discovery 124 } // namespace local_discovery
125 125
126 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SESSION_H_ 126 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SESSION_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/gcd_private/gcd_private_apitest.cc ('k') | chrome/browser/local_discovery/privetv3_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698