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

Side by Side Diff: chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h

Issue 1898503002: Cleanup LocalDiscoveryUIHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 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/cloud_print_private/cloud_print_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 (c) 2012 The Chromium Authors. All rights reserved. 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 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_CLOUD_PRINT_PRIVATE_CLOUD_PRINT_PRIVATE_AP I_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CLOUD_PRINT_PRIVATE_CLOUD_PRINT_PRIVATE_AP I_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_CLOUD_PRINT_PRIVATE_CLOUD_PRINT_PRIVATE_AP I_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_CLOUD_PRINT_PRIVATE_CLOUD_PRINT_PRIVATE_AP I_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "chrome/browser/extensions/chrome_extension_function.h" 11 #include "chrome/browser/extensions/chrome_extension_function.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 namespace api { 15 namespace api {
16 namespace cloud_print_private { 16 namespace cloud_print_private {
17 17
18 struct UserSettings; 18 struct UserSettings;
19 19
20 } // namespace cloud_print_private 20 } // namespace cloud_print_private
21 } // namespace api 21 } // namespace api
22 22
23 23
24 // For use only in tests. 24 // For use only in tests.
25 class CloudPrintTestsDelegate { 25 class CloudPrintTestsDelegate {
26 public: 26 public:
27 static CloudPrintTestsDelegate* Get();
28
27 CloudPrintTestsDelegate(); 29 CloudPrintTestsDelegate();
28 virtual ~CloudPrintTestsDelegate(); 30 virtual ~CloudPrintTestsDelegate();
29 31
30 virtual void SetupConnector( 32 virtual void SetupConnector(
31 const std::string& user_email, 33 const std::string& user_email,
32 const std::string& robot_email, 34 const std::string& robot_email,
33 const std::string& credentials, 35 const std::string& credentials,
34 const api::cloud_print_private::UserSettings& user_settings) = 0; 36 const api::cloud_print_private::UserSettings& user_settings) = 0;
35 37
36 virtual std::string GetHostName() = 0; 38 virtual std::string GetHostName() = 0;
37 39
38 virtual std::string GetClientId() = 0; 40 virtual std::string GetClientId() = 0;
39 41
40 virtual std::vector<std::string> GetPrinters() = 0; 42 virtual std::vector<std::string> GetPrinters() = 0;
41
42 static CloudPrintTestsDelegate* instance();
43
44 private:
45 // Points to single instance of this class during testing.
46 static CloudPrintTestsDelegate* instance_;
47 }; 43 };
48 44
49 class CloudPrintPrivateSetupConnectorFunction 45 class CloudPrintPrivateSetupConnectorFunction
50 : public ChromeAsyncExtensionFunction { 46 : public ChromeAsyncExtensionFunction {
51 public: 47 public:
52 DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.setupConnector", 48 DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.setupConnector",
53 CLOUDPRINTPRIVATE_SETUPCONNECTOR) 49 CLOUDPRINTPRIVATE_SETUPCONNECTOR)
54 50
55 CloudPrintPrivateSetupConnectorFunction(); 51 CloudPrintPrivateSetupConnectorFunction();
56 52
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 protected: 101 protected:
106 ~CloudPrintPrivateGetClientIdFunction() override; 102 ~CloudPrintPrivateGetClientIdFunction() override;
107 103
108 // ExtensionFunction: 104 // ExtensionFunction:
109 bool RunAsync() override; 105 bool RunAsync() override;
110 }; 106 };
111 107
112 } // namespace extensions 108 } // namespace extensions
113 109
114 #endif // CHROME_BROWSER_EXTENSIONS_API_CLOUD_PRINT_PRIVATE_CLOUD_PRINT_PRIVATE _API_H_ 110 #endif // CHROME_BROWSER_EXTENSIONS_API_CLOUD_PRINT_PRIVATE_CLOUD_PRINT_PRIVATE _API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698