chore: stop using a RenderWidgetHost observer in FileSelectHelper (#38168)

chore: stop using a RenderWidgetHost observer in FileSelectHelper
This commit is contained in:
Shelley Vohr 2023-05-04 21:43:29 +02:00 committed by GitHub
parent ec75172d68
commit f8d534f33e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 22 deletions

View file

@ -42,7 +42,6 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
content::BrowserThread::DeleteOnUIThread>,
public ui::SelectFileDialog::Listener,
public content::WebContentsObserver,
public content::RenderWidgetHostObserver,
private net::DirectoryLister::DirectoryListerDelegate {
public:
// disable copy
@ -98,10 +97,6 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
void* params) override;
void FileSelectionCanceled(void* params) override;
// content::RenderWidgetHostObserver overrides.
void RenderWidgetHostDestroyed(
content::RenderWidgetHost* widget_host) override;
// content::WebContentsObserver overrides.
void RenderFrameHostChanged(content::RenderFrameHost* old_host,
content::RenderFrameHost* new_host) override;
@ -220,10 +215,6 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
struct ActiveDirectoryEnumeration;
std::unique_ptr<ActiveDirectoryEnumeration> directory_enumeration_;
base::ScopedObservation<content::RenderWidgetHost,
content::RenderWidgetHostObserver>
observation_{this};
// Temporary files only used on OSX. This class is responsible for deleting
// these files when they are no longer needed.
std::vector<base::FilePath> temporary_files_;