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

Side by Side Diff: extensions/browser/api/management/management_api.h

Issue 1534123002: [Extensions] Migrate ExtensionInstallPrompt::Delegate to be a callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « chrome/chrome_tests.gypi ('k') | extensions/browser/api/management/management_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 EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_
6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ 6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/scoped_observer.h" 10 #include "base/scoped_observer.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // ExtensionFunction: 107 // ExtensionFunction:
108 bool RunSync() override; 108 bool RunSync() override;
109 }; 109 };
110 110
111 class ManagementSetEnabledFunction : public UIThreadExtensionFunction { 111 class ManagementSetEnabledFunction : public UIThreadExtensionFunction {
112 public: 112 public:
113 DECLARE_EXTENSION_FUNCTION("management.setEnabled", MANAGEMENT_SETENABLED) 113 DECLARE_EXTENSION_FUNCTION("management.setEnabled", MANAGEMENT_SETENABLED)
114 114
115 ManagementSetEnabledFunction(); 115 ManagementSetEnabledFunction();
116 116
117 void InstallUIProceed();
118 void InstallUIAbort(bool user_initiated);
119
120 protected: 117 protected:
121 ~ManagementSetEnabledFunction() override; 118 ~ManagementSetEnabledFunction() override;
122 119
123 // ExtensionFunction: 120 // ExtensionFunction:
124 ResponseAction Run() override; 121 ResponseAction Run() override;
125 122
126 private: 123 private:
124 void OnInstallPromptDone(bool did_accept);
125
127 void OnRequirementsChecked(const std::vector<std::string>& requirements); 126 void OnRequirementsChecked(const std::vector<std::string>& requirements);
128 127
129 std::string extension_id_; 128 std::string extension_id_;
130 129
131 scoped_ptr<InstallPromptDelegate> install_prompt_; 130 scoped_ptr<InstallPromptDelegate> install_prompt_;
132 131
133 scoped_ptr<RequirementsChecker> requirements_checker_; 132 scoped_ptr<RequirementsChecker> requirements_checker_;
134 }; 133 };
135 134
136 class ManagementUninstallFunctionBase : public UIThreadExtensionFunction { 135 class ManagementUninstallFunctionBase : public UIThreadExtensionFunction {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 scoped_ptr<ManagementEventRouter> management_event_router_; 288 scoped_ptr<ManagementEventRouter> management_event_router_;
290 289
291 scoped_ptr<ManagementAPIDelegate> delegate_; 290 scoped_ptr<ManagementAPIDelegate> delegate_;
292 291
293 DISALLOW_COPY_AND_ASSIGN(ManagementAPI); 292 DISALLOW_COPY_AND_ASSIGN(ManagementAPI);
294 }; 293 };
295 294
296 } // namespace extensions 295 } // namespace extensions
297 296
298 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_ 297 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | extensions/browser/api/management/management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698