OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_SOURCE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_SOURCE_H_ |
| 7 |
| 8 #include "base/location.h" |
| 9 #include "base/macros.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "content/public/browser/web_contents_user_data.h" |
| 12 |
| 13 class WebContentsSource |
| 14 : public content::WebContentsUserData<WebContentsSource> { |
| 15 public: |
| 16 CONTENT_EXPORT static void CreateForWebContentsAndLocation( |
| 17 content::WebContents* contents, |
| 18 const tracked_objects::Location& created_location); |
| 19 |
| 20 CONTENT_EXPORT tracked_objects::Location created_location() const { |
| 21 return created_location_; |
| 22 } |
| 23 |
| 24 private: |
| 25 explicit WebContentsSource(content::WebContents* contents); |
| 26 friend class content::WebContentsUserData<WebContentsSource>; |
| 27 |
| 28 tracked_objects::Location created_location_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(WebContentsSource); |
| 31 }; |
| 32 |
| 33 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_SOURCE_H_ |
OLD | NEW |