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

Side by Side Diff: chrome/browser/extensions/api/gcd_private/gcd_private_api.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, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/gcd_private/gcd_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/extensions/chrome_extension_function.h" 9 #include "chrome/browser/extensions/chrome_extension_function.h"
10 #include "chrome/browser/local_discovery/cloud_device_list_delegate.h" 10 #include "chrome/browser/local_discovery/cloud_device_list_delegate.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 GcdPrivateGetPrefetchedWifiNameListFunction(); 117 GcdPrivateGetPrefetchedWifiNameListFunction();
118 118
119 protected: 119 protected:
120 ~GcdPrivateGetPrefetchedWifiNameListFunction() override; 120 ~GcdPrivateGetPrefetchedWifiNameListFunction() override;
121 121
122 // SyncExtensionFunction overrides. 122 // SyncExtensionFunction overrides.
123 bool RunSync() override; 123 bool RunSync() override;
124 }; 124 };
125 125
126 class GcdPrivateGetDeviceInfoFunction : public ChromeAsyncExtensionFunction {
127 public:
128 DECLARE_EXTENSION_FUNCTION("gcdPrivate.getDeviceInfo",
129 GCDPRIVATE_GETDEVICEINFO)
130
131 GcdPrivateGetDeviceInfoFunction();
132
133 protected:
134 ~GcdPrivateGetDeviceInfoFunction() override;
135
136 // AsyncExtensionFunction overrides.
137 bool RunAsync() override;
138
139 private:
140 void OnSessionInitialized(
141 int session_id,
142 api::gcd_private::Status status,
143 const base::DictionaryValue& info);
144 };
145
126 class GcdPrivateCreateSessionFunction : public ChromeAsyncExtensionFunction { 146 class GcdPrivateCreateSessionFunction : public ChromeAsyncExtensionFunction {
127 public: 147 public:
128 DECLARE_EXTENSION_FUNCTION("gcdPrivate.createSession", 148 DECLARE_EXTENSION_FUNCTION("gcdPrivate.createSession",
129 GCDPRIVATE_ESTABLISHSESSION) 149 GCDPRIVATE_ESTABLISHSESSION)
130 150
131 GcdPrivateCreateSessionFunction(); 151 GcdPrivateCreateSessionFunction();
132 152
133 protected: 153 protected:
134 ~GcdPrivateCreateSessionFunction() override; 154 ~GcdPrivateCreateSessionFunction() override;
135 155
136 // AsyncExtensionFunction overrides. 156 // AsyncExtensionFunction overrides.
137 bool RunAsync() override; 157 bool RunAsync() override;
138 158
139 private: 159 private:
140 void OnSessionInitialized( 160 void OnSessionInitialized(
141 int session_id, 161 int session_id,
142 api::gcd_private::Status status, 162 api::gcd_private::Status status,
143 const std::vector<api::gcd_private::PairingType>& pairing_types); 163 const base::DictionaryValue& info);
144 }; 164 };
145 165
146 class GcdPrivateStartPairingFunction : public ChromeAsyncExtensionFunction { 166 class GcdPrivateStartPairingFunction : public ChromeAsyncExtensionFunction {
147 public: 167 public:
148 DECLARE_EXTENSION_FUNCTION("gcdPrivate.startPairing", GCDPRIVATE_STARTPAIRING) 168 DECLARE_EXTENSION_FUNCTION("gcdPrivate.startPairing", GCDPRIVATE_STARTPAIRING)
149 169
150 GcdPrivateStartPairingFunction(); 170 GcdPrivateStartPairingFunction();
151 171
152 protected: 172 protected:
153 ~GcdPrivateStartPairingFunction() override; 173 ~GcdPrivateStartPairingFunction() override;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 302
283 // AsyncExtensionFunction overrides. 303 // AsyncExtensionFunction overrides.
284 bool RunAsync() override; 304 bool RunAsync() override;
285 305
286 private: 306 private:
287 }; 307 };
288 308
289 } // namespace extensions 309 } // namespace extensions
290 310
291 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ 311 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/gcd_private/gcd_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698