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

Side by Side Diff: chrome/browser/data_use_measurement/data_use_web_contents_observer.h

Issue 2413663003: Expose GlobalRequestID in NavigationHandle and ResourceRequestInfo. (Closed)
Patch Set: Remove pending navigation queue. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DATA_USE_MEASUREMENT_DATA_USE_WEB_CONTENTS_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_DATA_USE_MEASUREMENT_DATA_USE_WEB_CONTENTS_OBSERVER_H_
6 #define CHROME_BROWSER_DATA_USE_MEASUREMENT_DATA_USE_WEB_CONTENTS_OBSERVER_H_ 6 #define CHROME_BROWSER_DATA_USE_MEASUREMENT_DATA_USE_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_contents_user_data.h" 10 #include "content/public/browser/web_contents_user_data.h"
(...skipping 14 matching lines...) Expand all
25 // observe all WebContents. 25 // observe all WebContents.
26 class DataUseWebContentsObserver 26 class DataUseWebContentsObserver
27 : public content::WebContentsObserver, 27 : public content::WebContentsObserver,
28 public content::WebContentsUserData<DataUseWebContentsObserver> { 28 public content::WebContentsUserData<DataUseWebContentsObserver> {
29 public: 29 public:
30 // Creates a DataUseWebContentsObserver for the given WebContents. 30 // Creates a DataUseWebContentsObserver for the given WebContents.
31 static void CreateForWebContents(content::WebContents* web_contents); 31 static void CreateForWebContents(content::WebContents* web_contents);
32 32
33 ~DataUseWebContentsObserver() override; 33 ~DataUseWebContentsObserver() override;
34 34
35 // WebContentsObserver: 35 // WebContentsObserver:
RyanSturm 2016/11/07 19:33:19 nit: s/WebContentsObserver/WebContentsObserver imp
Not at Google. Contact bengr 2016/11/07 22:17:18 Done.
36 // Called when a render frame host is created. 36 // Called when a render frame host is created.
37 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; 37 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
38 38
39 // Called when a render frame host is deleted. 39 // Called when a render frame host is deleted.
40 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; 40 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
41 41
42 // Called when a navigation is started. 42 // Called when a navigation is started.
43 void DidStartNavigation( 43 void DidStartNavigation(
44 content::NavigationHandle* navigation_handle) override; 44 content::NavigationHandle* navigation_handle) override;
45 45
46 // Called when a navigation is completed. 46 // Called when a navigation is ready to be committed in a renderer.
47 void DidFinishNavigation( 47 void ReadyToCommitNavigation(
48 content::NavigationHandle* navigation_handle) override; 48 content::NavigationHandle* navigation_handle) override;
49 49
50 // Called when a navigation is redirected. 50 // Called when a navigation is redirected.
51 void DidRedirectNavigation( 51 void DidRedirectNavigation(
52 content::NavigationHandle* navigation_handle) override; 52 content::NavigationHandle* navigation_handle) override;
53 53
54 private: 54 private:
55 friend class content::WebContentsUserData<DataUseWebContentsObserver>; 55 friend class content::WebContentsUserData<DataUseWebContentsObserver>;
56 56
57 DataUseWebContentsObserver(content::WebContents* web_contents, 57 DataUseWebContentsObserver(content::WebContents* web_contents,
58 ChromeDataUseAscriberService* service); 58 ChromeDataUseAscriberService* service);
59 ChromeDataUseAscriberService* const service_; 59 ChromeDataUseAscriberService* const service_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(DataUseWebContentsObserver); 61 DISALLOW_COPY_AND_ASSIGN(DataUseWebContentsObserver);
62 }; 62 };
63 63
64 } // namespace data_use_measurement 64 } // namespace data_use_measurement
65 65
66 #endif // CHROME_BROWSER_DATA_USE_MEASUREMENT_DATA_USE_WEB_CONTENTS_OBSERVER_H_ 66 #endif // CHROME_BROWSER_DATA_USE_MEASUREMENT_DATA_USE_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698