2017-04-12 03:25:56 +00:00
|
|
|
// Copyright (c) 2017 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2017-04-06 03:15:27 +00:00
|
|
|
#ifndef ATOM_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
|
|
|
|
#define ATOM_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
|
|
|
|
|
|
|
|
#include "content/public/browser/web_contents_observer.h"
|
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
2017-04-12 03:20:53 +00:00
|
|
|
// ChildWebContentsTracker tracks child WebContents
|
|
|
|
// created by native `window.open()`
|
2017-04-06 03:15:27 +00:00
|
|
|
class ChildWebContentsTracker : public content::WebContentsObserver {
|
|
|
|
public:
|
2017-04-12 03:25:56 +00:00
|
|
|
explicit ChildWebContentsTracker(content::WebContents* web_contents);
|
2017-04-06 03:15:27 +00:00
|
|
|
static bool IsChildWebContents(content::WebContents* web_contents);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void WebContentsDestroyed() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
|
|
|
#endif // ATOM_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
|