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

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

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.cc
diff --git a/content/public/browser/web_contents_source.cc b/content/public/browser/web_contents_source.cc
new file mode 100644
index 0000000000000000000000000000000000000000..71124cffbf0f2067088a6f8d9f1fbb236f83f77f
--- /dev/null
+++ b/content/public/browser/web_contents_source.cc
@@ -0,0 +1,22 @@
+// 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.
+
+#include "content/public/browser/web_contents_source.h"
+
+// DEFINE_WEB_CONTENTS_USER_DATA_KEY(WebContentsSource);
+// Can't use the regular macro because this must be CONTENT_EXPORTed.
+template <>
+CONTENT_EXPORT int
+ content::WebContentsUserData<WebContentsSource>::kLocatorKey = 0;
+
+// static
+void WebContentsSource::CreateForWebContentsAndLocation(
+ content::WebContents* contents,
+ const tracked_objects::Location& created_location) {
+ WebContentsSource::CreateForWebContents(contents);
+ WebContentsSource* self = WebContentsSource::FromWebContents(contents);
+ self->created_location_ = created_location;
+}
+
+WebContentsSource::WebContentsSource(content::WebContents* contents) {}

Powered by Google App Engine
This is Rietveld 408576698