Remove WebContentsUserData::kLocatorKey

1093015
This commit is contained in:
Jeremy Apthorp 2018-10-02 15:14:43 -07:00
parent 2d46164ce0
commit 34e54b93a4
7 changed files with 39 additions and 23 deletions

View file

@ -346,18 +346,20 @@ class NativeWindow : public base::SupportsUserData,
class NativeWindowRelay
: public content::WebContentsUserData<NativeWindowRelay> {
public:
explicit NativeWindowRelay(base::WeakPtr<NativeWindow> window);
static const void* const kNativeWindowRelayUserDataKey;
static void CreateForWebContents(content::WebContents*,
base::WeakPtr<NativeWindow>);
~NativeWindowRelay() override;
static void* UserDataKey() {
return content::WebContentsUserData<NativeWindowRelay>::UserDataKey();
}
void* key;
base::WeakPtr<NativeWindow> window;
NativeWindow* GetNativeWindow() const { return native_window_.get(); }
private:
friend class content::WebContentsUserData<NativeWindow>;
explicit NativeWindowRelay(base::WeakPtr<NativeWindow> window);
base::WeakPtr<NativeWindow> native_window_;
};
} // namespace atom