| OLD | NEW |
| 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/linked_ptr.h" | 8 #include "base/memory/linked_ptr.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/extensions/chrome_extension_function.h" | 10 #include "chrome/browser/extensions/chrome_extension_function.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 GcdPrivateQueryForNewLocalDevicesFunction(); | 108 GcdPrivateQueryForNewLocalDevicesFunction(); |
| 109 | 109 |
| 110 protected: | 110 protected: |
| 111 virtual ~GcdPrivateQueryForNewLocalDevicesFunction(); | 111 virtual ~GcdPrivateQueryForNewLocalDevicesFunction(); |
| 112 | 112 |
| 113 // SyncExtensionFunction overrides. | 113 // SyncExtensionFunction overrides. |
| 114 virtual bool RunSync() OVERRIDE; | 114 virtual bool RunSync() OVERRIDE; |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 class GcdPrivateStartSetupFunction : public ChromeAsyncExtensionFunction { | 117 class GcdPrivatePrefetchWifiPasswordFunction |
| 118 : public ChromeAsyncExtensionFunction { |
| 118 public: | 119 public: |
| 119 public: | 120 DECLARE_EXTENSION_FUNCTION("gcdPrivate.prefetchWifiPassword", |
| 120 DECLARE_EXTENSION_FUNCTION("gcdPrivate.startSetup", GCDPRIVATE_STARTSETUP) | 121 GCDPRIVATE_PREFETCHWIFIPASSWORD) |
| 121 | 122 |
| 122 GcdPrivateStartSetupFunction(); | 123 GcdPrivatePrefetchWifiPasswordFunction(); |
| 123 | 124 |
| 124 protected: | 125 protected: |
| 125 virtual ~GcdPrivateStartSetupFunction(); | 126 virtual ~GcdPrivatePrefetchWifiPasswordFunction(); |
| 126 | 127 |
| 127 // AsyncExtensionFunction overrides. | 128 // AsyncExtensionFunction overrides. |
| 128 virtual bool RunAsync() OVERRIDE; | 129 virtual bool RunAsync() OVERRIDE; |
| 129 | |
| 130 private: | |
| 131 }; | 130 }; |
| 132 | 131 |
| 133 class GcdPrivateSetWiFiNetworkFunction : public ChromeAsyncExtensionFunction { | 132 class GcdPrivateEstablishSessionFunction : public ChromeAsyncExtensionFunction { |
| 134 public: | 133 public: |
| 135 DECLARE_EXTENSION_FUNCTION("gcdPrivate.setWiFiNetwork", | 134 DECLARE_EXTENSION_FUNCTION("gcdPrivate.establishSession", |
| 136 GCDPRIVATE_SETWIFINETWORK) | 135 GCDPRIVATE_ESTABLISHSESSION) |
| 137 | 136 |
| 138 GcdPrivateSetWiFiNetworkFunction(); | 137 GcdPrivateEstablishSessionFunction(); |
| 139 | 138 |
| 140 protected: | 139 protected: |
| 141 virtual ~GcdPrivateSetWiFiNetworkFunction(); | 140 virtual ~GcdPrivateEstablishSessionFunction(); |
| 142 | 141 |
| 143 // AsyncExtensionFunction overrides. | 142 // AsyncExtensionFunction overrides. |
| 144 virtual bool RunAsync() OVERRIDE; | 143 virtual bool RunAsync() OVERRIDE; |
| 145 | |
| 146 private: | |
| 147 }; | 144 }; |
| 148 | 145 |
| 149 class GcdPrivateSetWiFiPasswordFunction : public ChromeAsyncExtensionFunction { | 146 class GcdPrivateConfirmCodeFunction : public ChromeAsyncExtensionFunction { |
| 150 public: | 147 public: |
| 151 DECLARE_EXTENSION_FUNCTION("gcdPrivate.setWiFiPassword", | 148 DECLARE_EXTENSION_FUNCTION("gcdPrivate.confirmCode", GCDPRIVATE_CONFIRMCODE) |
| 152 GCDPRIVATE_SETWIFIPASSWORD) | |
| 153 | 149 |
| 154 GcdPrivateSetWiFiPasswordFunction(); | 150 GcdPrivateConfirmCodeFunction(); |
| 155 | 151 |
| 156 protected: | 152 protected: |
| 157 virtual ~GcdPrivateSetWiFiPasswordFunction(); | 153 virtual ~GcdPrivateConfirmCodeFunction(); |
| 158 | 154 |
| 159 // AsyncExtensionFunction overrides. | 155 // AsyncExtensionFunction overrides. |
| 160 virtual bool RunAsync() OVERRIDE; | 156 virtual bool RunAsync() OVERRIDE; |
| 161 | 157 |
| 162 private: | 158 private: |
| 163 }; | 159 }; |
| 164 | 160 |
| 165 class GcdPrivateConfirmCodeFunction : public ChromeAsyncExtensionFunction { | 161 class GcdPrivateSendMessageFunction : public ChromeAsyncExtensionFunction { |
| 166 public: | 162 public: |
| 167 DECLARE_EXTENSION_FUNCTION("gcdPrivate.confirmCode", GCDPRIVATE_CONFIRMCODE) | 163 DECLARE_EXTENSION_FUNCTION("gcdPrivate.sendMessage", GCDPRIVATE_SENDMESSAGE) |
| 168 | 164 |
| 169 GcdPrivateConfirmCodeFunction(); | 165 GcdPrivateSendMessageFunction(); |
| 170 | 166 |
| 171 protected: | 167 protected: |
| 172 virtual ~GcdPrivateConfirmCodeFunction(); | 168 virtual ~GcdPrivateSendMessageFunction(); |
| 173 | 169 |
| 174 // AsyncExtensionFunction overrides. | 170 // AsyncExtensionFunction overrides. |
| 175 virtual bool RunAsync() OVERRIDE; | 171 virtual bool RunAsync() OVERRIDE; |
| 176 | 172 |
| 177 private: | 173 private: |
| 178 }; | 174 }; |
| 179 | 175 |
| 180 class GcdPrivateStopSetupFunction : public ChromeAsyncExtensionFunction { | 176 class GcdPrivateTerminateSessionFunction : public ChromeAsyncExtensionFunction { |
| 181 public: | 177 public: |
| 182 DECLARE_EXTENSION_FUNCTION("gcdPrivate.stopSetup", GCDPRIVATE_STOPSETUP) | 178 DECLARE_EXTENSION_FUNCTION("gcdPrivate.terminateSession", |
| 179 GCDPRIVATE_TERMINATESESSION) |
| 183 | 180 |
| 184 GcdPrivateStopSetupFunction(); | 181 GcdPrivateTerminateSessionFunction(); |
| 185 | 182 |
| 186 protected: | 183 protected: |
| 187 virtual ~GcdPrivateStopSetupFunction(); | 184 virtual ~GcdPrivateTerminateSessionFunction(); |
| 188 | 185 |
| 189 // AsyncExtensionFunction overrides. | 186 // AsyncExtensionFunction overrides. |
| 190 virtual bool RunAsync() OVERRIDE; | 187 virtual bool RunAsync() OVERRIDE; |
| 191 | |
| 192 private: | |
| 193 }; | 188 }; |
| 194 | 189 |
| 195 class GcdPrivateGetCommandDefinitionsFunction | 190 class GcdPrivateGetCommandDefinitionsFunction |
| 196 : public ChromeAsyncExtensionFunction { | 191 : public ChromeAsyncExtensionFunction { |
| 197 public: | 192 public: |
| 198 DECLARE_EXTENSION_FUNCTION("gcdPrivate.getCommandDefinitions", | 193 DECLARE_EXTENSION_FUNCTION("gcdPrivate.getCommandDefinitions", |
| 199 GCDPRIVATE_GETCOMMANDDEFINITIONS) | 194 GCDPRIVATE_GETCOMMANDDEFINITIONS) |
| 200 | 195 |
| 201 GcdPrivateGetCommandDefinitionsFunction(); | 196 GcdPrivateGetCommandDefinitionsFunction(); |
| 202 | 197 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 | 263 |
| 269 // AsyncExtensionFunction overrides. | 264 // AsyncExtensionFunction overrides. |
| 270 virtual bool RunAsync() OVERRIDE; | 265 virtual bool RunAsync() OVERRIDE; |
| 271 | 266 |
| 272 private: | 267 private: |
| 273 }; | 268 }; |
| 274 | 269 |
| 275 } // namespace extensions | 270 } // namespace extensions |
| 276 | 271 |
| 277 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ | 272 #endif // CHROME_BROWSER_EXTENSIONS_API_GCD_PRIVATE_GCD_PRIVATE_API_H_ |
| OLD | NEW |