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.
|
|
|
|
|
2019-06-19 20:56:58 +00:00
|
|
|
#ifndef SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
|
|
|
|
#define SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
|
2017-04-06 03:15:27 +00:00
|
|
|
|
2018-10-22 18:02:25 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "content/public/browser/web_contents_user_data.h"
|
2017-04-06 03:15:27 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
2017-04-12 03:20:53 +00:00
|
|
|
// ChildWebContentsTracker tracks child WebContents
|
|
|
|
// created by native `window.open()`
|
2018-10-22 18:02:25 +00:00
|
|
|
struct ChildWebContentsTracker
|
|
|
|
: public content::WebContentsUserData<ChildWebContentsTracker> {
|
|
|
|
GURL url;
|
|
|
|
std::string frame_name;
|
|
|
|
|
|
|
|
private:
|
2019-01-21 16:56:54 +00:00
|
|
|
explicit ChildWebContentsTracker(content::WebContents* web_contents);
|
2018-10-22 18:02:25 +00:00
|
|
|
friend class content::WebContentsUserData<ChildWebContentsTracker>;
|
2017-04-06 03:15:27 +00:00
|
|
|
|
2019-01-21 16:56:54 +00:00
|
|
|
WEB_CONTENTS_USER_DATA_KEY_DECL();
|
|
|
|
|
2018-10-22 18:02:25 +00:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(ChildWebContentsTracker);
|
2017-04-06 03:15:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
2019-06-19 20:56:58 +00:00
|
|
|
#endif // SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_
|