Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1147)

Unified Diff: content/public/browser/web_contents_source.h

Issue 1432143002: Track where WebContents are created in order to better understand issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698