blob: c399d4493cf8706670f11fc0af841edadc3f00b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// 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 CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_
#define CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_
#include "base/macros.h"
#include "content/public/browser/background_tracing_manager.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
namespace tracing {
void SetupNavigationTracing();
class NavigationTracingObserver
: public content::WebContentsObserver,
public content::WebContentsUserData<NavigationTracingObserver> {
public:
static bool IsEnabled();
private:
friend class content::WebContentsUserData<NavigationTracingObserver>;
explicit NavigationTracingObserver(content::WebContents* web_contents);
~NavigationTracingObserver() override;
// content::WebContentsObserver implementation.
void DidStartProvisionalLoadForFrame(
content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
bool is_error_page,
bool is_iframe_srcdoc) override;
static content::BackgroundTracingManager::TriggerHandle navigation_handle;
DISALLOW_COPY_AND_ASSIGN(NavigationTracingObserver);
};
} // namespace tracing
#endif // CHROME_BROWSER_TRACING_NAVIGATION_TRACING_H_
|