parent
2d46164ce0
commit
34e54b93a4
7 changed files with 39 additions and 23 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue