2019-07-24 23:01:08 +00:00
|
|
|
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2020-02-03 22:01:10 +00:00
|
|
|
#include "shell/browser/extensions/electron_extension_web_contents_observer.h"
|
2019-07-24 23:01:08 +00:00
|
|
|
|
|
|
|
namespace extensions {
|
|
|
|
|
2020-02-03 22:01:10 +00:00
|
|
|
ElectronExtensionWebContentsObserver::ElectronExtensionWebContentsObserver(
|
2019-07-24 23:01:08 +00:00
|
|
|
content::WebContents* web_contents)
|
|
|
|
: ExtensionWebContentsObserver(web_contents) {}
|
|
|
|
|
2021-06-04 04:16:13 +00:00
|
|
|
ElectronExtensionWebContentsObserver::~ElectronExtensionWebContentsObserver() =
|
|
|
|
default;
|
2019-07-24 23:01:08 +00:00
|
|
|
|
2020-02-03 22:01:10 +00:00
|
|
|
void ElectronExtensionWebContentsObserver::CreateForWebContents(
|
2019-07-24 23:01:08 +00:00
|
|
|
content::WebContents* web_contents) {
|
|
|
|
content::WebContentsUserData<
|
2020-02-03 22:01:10 +00:00
|
|
|
ElectronExtensionWebContentsObserver>::CreateForWebContents(web_contents);
|
2019-07-24 23:01:08 +00:00
|
|
|
|
|
|
|
// Initialize this instance if necessary.
|
|
|
|
FromWebContents(web_contents)->Initialize();
|
|
|
|
}
|
|
|
|
|
2020-02-03 22:01:10 +00:00
|
|
|
WEB_CONTENTS_USER_DATA_KEY_IMPL(ElectronExtensionWebContentsObserver)
|
2019-07-24 23:01:08 +00:00
|
|
|
|
|
|
|
} // namespace extensions
|