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

Side by Side Diff: extensions/browser/api/printer_provider/printer_provider_api.h

Issue 903123002: Allow printerProvider API services in incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_H_
6 #define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_H_ 6 #define EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // Completes the request with the provided request id. It runs the request 202 // Completes the request with the provided request id. It runs the request
203 // callback and removes the request from the set. 203 // callback and removes the request from the set.
204 bool Complete(int request_id, PrintError result); 204 bool Complete(int request_id, PrintError result);
205 205
206 private: 206 private:
207 int last_request_id_; 207 int last_request_id_;
208 std::map<int, PrintCallback> pending_requests_; 208 std::map<int, PrintCallback> pending_requests_;
209 }; 209 };
210 210
211 // BrowserContextKeyedAPI implementation. 211 // BrowserContextKeyedAPI implementation.
212 static const bool kServiceRedirectedInIncognito = true;
212 static const char* service_name() { return "PrinterProvider"; } 213 static const char* service_name() { return "PrinterProvider"; }
213 214
214 // PrinterProviderInternalAPIObserver implementation: 215 // PrinterProviderInternalAPIObserver implementation:
215 void OnGetPrintersResult( 216 void OnGetPrintersResult(
216 const Extension* extension, 217 const Extension* extension,
217 int request_id, 218 int request_id,
218 const PrinterProviderInternalAPIObserver::PrinterInfoVector& result) 219 const PrinterProviderInternalAPIObserver::PrinterInfoVector& result)
219 override; 220 override;
220 void OnGetCapabilityResult(const Extension* extension, 221 void OnGetCapabilityResult(const Extension* extension,
221 int request_id, 222 int request_id,
(...skipping 28 matching lines...) Expand all
250 DISALLOW_COPY_AND_ASSIGN(PrinterProviderAPI); 251 DISALLOW_COPY_AND_ASSIGN(PrinterProviderAPI);
251 }; 252 };
252 253
253 template <> 254 template <>
254 void BrowserContextKeyedAPIFactory< 255 void BrowserContextKeyedAPIFactory<
255 PrinterProviderAPI>::DeclareFactoryDependencies(); 256 PrinterProviderAPI>::DeclareFactoryDependencies();
256 257
257 } // namespace extensions 258 } // namespace extensions
258 259
259 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_H_ 260 #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_PRINTER_PROVIDER_API_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698