| Index: content/public/browser/web_contents_source.h
|
| diff --git a/content/public/browser/web_contents_source.h b/content/public/browser/web_contents_source.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6c4fd9b0edd1d43ccb48602221177ab14e3c7d5b
|
| --- /dev/null
|
| +++ b/content/public/browser/web_contents_source.h
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2015 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.
|
| +
|
| +#ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_SOURCE_H_
|
| +#define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_SOURCE_H_
|
| +
|
| +#include "base/location.h"
|
| +#include "base/macros.h"
|
| +#include "content/common/content_export.h"
|
| +#include "content/public/browser/web_contents_user_data.h"
|
| +
|
| +class WebContentsSource
|
| + : public content::WebContentsUserData<WebContentsSource> {
|
| + public:
|
| + CONTENT_EXPORT static void CreateForWebContentsAndLocation(
|
| + content::WebContents* contents,
|
| + const tracked_objects::Location& created_location);
|
| +
|
| + CONTENT_EXPORT tracked_objects::Location created_location() const {
|
| + return created_location_;
|
| + }
|
| +
|
| + private:
|
| + explicit WebContentsSource(content::WebContents* contents);
|
| + friend class content::WebContentsUserData<WebContentsSource>;
|
| +
|
| + tracked_objects::Location created_location_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(WebContentsSource);
|
| +};
|
| +
|
| +#endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_SOURCE_H_
|
|
|