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

Side by Side Diff: chrome/browser/extensions/extension_view_host.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 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_EXTENSIONS_EXTENSION_VIEW_HOST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/web_modal/web_contents_modal_dialog_host.h" 11 #include "components/web_modal/web_contents_modal_dialog_host.h"
11 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 12 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
12 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
14 #include "extensions/browser/extension_host.h" 15 #include "extensions/browser/extension_host.h"
15 16
16 class Browser; 17 class Browser;
17 18
18 namespace content { 19 namespace content {
19 class SiteInstance; 20 class SiteInstance;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 content::WebContents* GetAssociatedWebContents() const override; 104 content::WebContents* GetAssociatedWebContents() const override;
104 content::WebContents* GetVisibleWebContents() const override; 105 content::WebContents* GetVisibleWebContents() const override;
105 106
106 // content::NotificationObserver 107 // content::NotificationObserver
107 void Observe(int type, 108 void Observe(int type,
108 const content::NotificationSource& source, 109 const content::NotificationSource& source,
109 const content::NotificationDetails& details) override; 110 const content::NotificationDetails& details) override;
110 111
111 private: 112 private:
112 // Implemented per-platform. Create the platform-specific ExtensionView. 113 // Implemented per-platform. Create the platform-specific ExtensionView.
113 static scoped_ptr<ExtensionView> CreateExtensionView(ExtensionViewHost* host, 114 static std::unique_ptr<ExtensionView> CreateExtensionView(
114 Browser* browser); 115 ExtensionViewHost* host,
116 Browser* browser);
115 117
116 // Optional view that shows the rendered content in the UI. 118 // Optional view that shows the rendered content in the UI.
117 scoped_ptr<ExtensionView> view_; 119 std::unique_ptr<ExtensionView> view_;
118 120
119 // The relevant WebContents associated with this ExtensionViewHost, if any. 121 // The relevant WebContents associated with this ExtensionViewHost, if any.
120 content::WebContents* associated_web_contents_; 122 content::WebContents* associated_web_contents_;
121 123
122 // Observer to detect when the associated web contents is destroyed. 124 // Observer to detect when the associated web contents is destroyed.
123 class AssociatedWebContentsObserver; 125 class AssociatedWebContentsObserver;
124 scoped_ptr<AssociatedWebContentsObserver> associated_web_contents_observer_; 126 std::unique_ptr<AssociatedWebContentsObserver>
127 associated_web_contents_observer_;
125 128
126 content::NotificationRegistrar registrar_; 129 content::NotificationRegistrar registrar_;
127 130
128 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost); 131 DISALLOW_COPY_AND_ASSIGN(ExtensionViewHost);
129 }; 132 };
130 133
131 } // namespace extensions 134 } // namespace extensions
132 135
133 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_ 136 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_VIEW_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_util.cc ('k') | chrome/browser/extensions/extension_view_host_factory_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698