OLD | NEW |
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_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 bool RunSync() override; | 280 bool RunSync() override; |
281 | 281 |
282 // Overridden from ExtensionInstallPrompt::Delegate | 282 // Overridden from ExtensionInstallPrompt::Delegate |
283 void InstallUIProceed() override; | 283 void InstallUIProceed() override; |
284 void InstallUIAbort(bool user_initiated) override; | 284 void InstallUIAbort(bool user_initiated) override; |
285 | 285 |
286 scoped_ptr<ExtensionInstallPrompt> prompt_; | 286 scoped_ptr<ExtensionInstallPrompt> prompt_; |
287 std::string extension_id_; | 287 std::string extension_id_; |
288 }; | 288 }; |
289 | 289 |
290 class DeveloperPrivateEnableFunction | |
291 : public ChromeSyncExtensionFunction, | |
292 public base::SupportsWeakPtr<DeveloperPrivateEnableFunction> { | |
293 public: | |
294 DECLARE_EXTENSION_FUNCTION("developerPrivate.enable", | |
295 DEVELOPERPRIVATE_ENABLE); | |
296 | |
297 DeveloperPrivateEnableFunction(); | |
298 | |
299 protected: | |
300 ~DeveloperPrivateEnableFunction() override; | |
301 | |
302 // Callback for requirements checker. | |
303 void OnRequirementsChecked( | |
304 const std::string& extension_id, | |
305 const std::vector<std::string>& requirements_errors); | |
306 // ExtensionFunction: | |
307 bool RunSync() override; | |
308 | |
309 private: | |
310 scoped_ptr<RequirementsChecker> requirements_checker_; | |
311 }; | |
312 | |
313 class DeveloperPrivateChooseEntryFunction : public ChromeAsyncExtensionFunction, | 290 class DeveloperPrivateChooseEntryFunction : public ChromeAsyncExtensionFunction, |
314 public EntryPickerClient { | 291 public EntryPickerClient { |
315 protected: | 292 protected: |
316 ~DeveloperPrivateChooseEntryFunction() override; | 293 ~DeveloperPrivateChooseEntryFunction() override; |
317 bool RunAsync() override; | 294 bool RunAsync() override; |
318 bool ShowPicker(ui::SelectFileDialog::Type picker_type, | 295 bool ShowPicker(ui::SelectFileDialog::Type picker_type, |
319 const base::FilePath& last_directory, | 296 const base::FilePath& last_directory, |
320 const base::string16& select_title, | 297 const base::string16& select_title, |
321 const ui::SelectFileDialog::FileTypeInfo& info, | 298 const ui::SelectFileDialog::FileTypeInfo& info, |
322 int file_type_index); | 299 int file_type_index); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 | 460 |
484 // ExtensionFunction: | 461 // ExtensionFunction: |
485 bool RunAsync() override; | 462 bool RunAsync() override; |
486 }; | 463 }; |
487 | 464 |
488 } // namespace api | 465 } // namespace api |
489 | 466 |
490 } // namespace extensions | 467 } // namespace extensions |
491 | 468 |
492 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ | 469 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ |
OLD | NEW |