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

Side by Side Diff: chrome/browser/ui/app_list/search/extension_app_result.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UI_APP_LIST_SEARCH_EXTENSION_APP_RESULT_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_EXTENSION_APP_RESULT_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_EXTENSION_APP_RESULT_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_EXTENSION_APP_RESULT_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/ui/app_list/search/app_result.h" 12 #include "chrome/browser/ui/app_list/search/app_result.h"
13 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h" 13 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
14 #include "extensions/browser/extension_icon_image.h" 14 #include "extensions/browser/extension_icon_image.h"
15 #include "extensions/browser/extension_registry_observer.h" 15 #include "extensions/browser/extension_registry_observer.h"
16 16
17 class AppListControllerDelegate; 17 class AppListControllerDelegate;
18 class ExtensionEnableFlow; 18 class ExtensionEnableFlow;
19 class Profile; 19 class Profile;
20 20
21 namespace extensions { 21 namespace extensions {
(...skipping 10 matching lines...) Expand all
32 public extensions::ExtensionRegistryObserver { 32 public extensions::ExtensionRegistryObserver {
33 public: 33 public:
34 ExtensionAppResult(Profile* profile, 34 ExtensionAppResult(Profile* profile,
35 const std::string& app_id, 35 const std::string& app_id,
36 AppListControllerDelegate* controller, 36 AppListControllerDelegate* controller,
37 bool is_recommendation); 37 bool is_recommendation);
38 ~ExtensionAppResult() override; 38 ~ExtensionAppResult() override;
39 39
40 // SearchResult overrides: 40 // SearchResult overrides:
41 void Open(int event_flags) override; 41 void Open(int event_flags) override;
42 scoped_ptr<SearchResult> Duplicate() const override; 42 std::unique_ptr<SearchResult> Duplicate() const override;
43 ui::MenuModel* GetContextMenuModel() override; 43 ui::MenuModel* GetContextMenuModel() override;
44 44
45 private: 45 private:
46 void StartObservingExtensionRegistry(); 46 void StartObservingExtensionRegistry();
47 void StopObservingExtensionRegistry(); 47 void StopObservingExtensionRegistry();
48 48
49 // Checks if extension is disabled and if enable flow should be started. 49 // Checks if extension is disabled and if enable flow should be started.
50 // Returns true if extension enable flow is started or there is already one 50 // Returns true if extension enable flow is started or there is already one
51 // running. 51 // running.
52 bool RunExtensionEnableFlow(); 52 bool RunExtensionEnableFlow();
(...skipping 11 matching lines...) Expand all
64 // ExtensionEnableFlowDelegate overrides: 64 // ExtensionEnableFlowDelegate overrides:
65 void ExtensionEnableFlowFinished() override; 65 void ExtensionEnableFlowFinished() override;
66 void ExtensionEnableFlowAborted(bool user_initiated) override; 66 void ExtensionEnableFlowAborted(bool user_initiated) override;
67 67
68 // extensions::ExtensionRegistryObserver override: 68 // extensions::ExtensionRegistryObserver override:
69 void OnExtensionLoaded(content::BrowserContext* browser_context, 69 void OnExtensionLoaded(content::BrowserContext* browser_context,
70 const extensions::Extension* extension) override; 70 const extensions::Extension* extension) override;
71 void OnShutdown(extensions::ExtensionRegistry* registry) override; 71 void OnShutdown(extensions::ExtensionRegistry* registry) override;
72 72
73 bool is_platform_app_; 73 bool is_platform_app_;
74 scoped_ptr<extensions::IconImage> icon_; 74 std::unique_ptr<extensions::IconImage> icon_;
75 scoped_ptr<ExtensionAppContextMenu> context_menu_; 75 std::unique_ptr<ExtensionAppContextMenu> context_menu_;
76 scoped_ptr<ExtensionEnableFlow> extension_enable_flow_; 76 std::unique_ptr<ExtensionEnableFlow> extension_enable_flow_;
77 77
78 extensions::ExtensionRegistry* extension_registry_ = nullptr; 78 extensions::ExtensionRegistry* extension_registry_ = nullptr;
79 79
80 DISALLOW_COPY_AND_ASSIGN(ExtensionAppResult); 80 DISALLOW_COPY_AND_ASSIGN(ExtensionAppResult);
81 }; 81 };
82 82
83 } // namespace app_list 83 } // namespace app_list
84 84
85 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_EXTENSION_APP_RESULT_H_ 85 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_EXTENSION_APP_RESULT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698