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

Side by Side Diff: chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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
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 CHROME_BROWSER_EXTENSIONS_API_DASHBOARD_PRIVATE_DASHBOARD_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DASHBOARD_PRIVATE_DASHBOARD_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DASHBOARD_PRIVATE_DASHBOARD_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DASHBOARD_PRIVATE_DASHBOARD_PRIVATE_API_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h" 12 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h"
13 #include "chrome/browser/extensions/bundle_installer.h" 13 #include "chrome/browser/extensions/bundle_installer.h"
14 #include "chrome/browser/extensions/chrome_extension_function_details.h" 14 #include "chrome/browser/extensions/chrome_extension_function_details.h"
15 #include "chrome/browser/extensions/extension_install_prompt.h" 15 #include "chrome/browser/extensions/extension_install_prompt.h"
16 #include "chrome/browser/extensions/webstore_install_helper.h" 16 #include "chrome/browser/extensions/webstore_install_helper.h"
17 #include "chrome/common/extensions/api/dashboard_private.h" 17 #include "chrome/common/extensions/api/dashboard_private.h"
18 #include "extensions/browser/extension_function.h" 18 #include "extensions/browser/extension_function.h"
19 #include "third_party/skia/include/core/SkBitmap.h" 19 #include "third_party/skia/include/core/SkBitmap.h"
20 20
21 class GURL; 21 class GURL;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 base::DictionaryValue* parsed_manifest) override; 53 base::DictionaryValue* parsed_manifest) override;
54 void OnWebstoreParseFailure(const std::string& id, 54 void OnWebstoreParseFailure(const std::string& id,
55 InstallHelperResultCode result, 55 InstallHelperResultCode result,
56 const std::string& error_message) override; 56 const std::string& error_message) override;
57 57
58 void OnInstallPromptDone(ExtensionInstallPrompt::Result result); 58 void OnInstallPromptDone(ExtensionInstallPrompt::Result result);
59 59
60 ExtensionFunction::ResponseValue BuildResponse( 60 ExtensionFunction::ResponseValue BuildResponse(
61 api::dashboard_private::Result result, 61 api::dashboard_private::Result result,
62 const std::string& error); 62 const std::string& error);
63 scoped_ptr<base::ListValue> CreateResults( 63 std::unique_ptr<base::ListValue> CreateResults(
64 api::dashboard_private::Result result) const; 64 api::dashboard_private::Result result) const;
65 65
66 const Params::Details& details() const { return params_->details; } 66 const Params::Details& details() const { return params_->details; }
67 67
68 scoped_ptr<Params> params_; 68 std::unique_ptr<Params> params_;
69 69
70 // A dummy Extension object we create for the purposes of using 70 // A dummy Extension object we create for the purposes of using
71 // ExtensionInstallPrompt to prompt for confirmation of the install. 71 // ExtensionInstallPrompt to prompt for confirmation of the install.
72 scoped_refptr<Extension> dummy_extension_; 72 scoped_refptr<Extension> dummy_extension_;
73 73
74 scoped_ptr<ExtensionInstallPrompt> install_prompt_; 74 std::unique_ptr<ExtensionInstallPrompt> install_prompt_;
75 75
76 DISALLOW_COPY_AND_ASSIGN( 76 DISALLOW_COPY_AND_ASSIGN(
77 DashboardPrivateShowPermissionPromptForDelegatedInstallFunction); 77 DashboardPrivateShowPermissionPromptForDelegatedInstallFunction);
78 }; 78 };
79 79
80 class DashboardPrivateShowPermissionPromptForDelegatedBundleInstallFunction 80 class DashboardPrivateShowPermissionPromptForDelegatedBundleInstallFunction
81 : public UIThreadExtensionFunction, 81 : public UIThreadExtensionFunction,
82 public chrome::BitmapFetcherDelegate { 82 public chrome::BitmapFetcherDelegate {
83 public: 83 public:
84 DECLARE_EXTENSION_FUNCTION( 84 DECLARE_EXTENSION_FUNCTION(
(...skipping 14 matching lines...) Expand all
99 99
100 // chrome::BitmapFetcherDelegate: 100 // chrome::BitmapFetcherDelegate:
101 void OnFetchComplete(const GURL& url, const SkBitmap* bitmap) override; 101 void OnFetchComplete(const GURL& url, const SkBitmap* bitmap) override;
102 102
103 void OnInstallApproval(BundleInstaller::ApprovalState state); 103 void OnInstallApproval(BundleInstaller::ApprovalState state);
104 104
105 const Params::Details& details() const { return params_->details; } 105 const Params::Details& details() const { return params_->details; }
106 106
107 ChromeExtensionFunctionDetails chrome_details_; 107 ChromeExtensionFunctionDetails chrome_details_;
108 108
109 scoped_ptr<Params> params_; 109 std::unique_ptr<Params> params_;
110 110
111 scoped_ptr<extensions::BundleInstaller> bundle_; 111 std::unique_ptr<extensions::BundleInstaller> bundle_;
112 scoped_ptr<chrome::BitmapFetcher> icon_fetcher_; 112 std::unique_ptr<chrome::BitmapFetcher> icon_fetcher_;
113 }; 113 };
114 114
115 } // namespace extensions 115 } // namespace extensions
116 116
117 #endif // CHROME_BROWSER_EXTENSIONS_API_DASHBOARD_PRIVATE_DASHBOARD_PRIVATE_API _H_ 117 #endif // CHROME_BROWSER_EXTENSIONS_API_DASHBOARD_PRIVATE_DASHBOARD_PRIVATE_API _H_
118 118
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698