forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbreadcrumb_manager_tab_helper.h
53 lines (43 loc) · 2.04 KB
/
breadcrumb_manager_tab_helper.h
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
45
46
47
48
49
50
51
52
53
// Copyright 2021 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_BREADCRUMBS_BREADCRUMB_MANAGER_TAB_HELPER_H_
#define CHROME_BROWSER_BREADCRUMBS_BREADCRUMB_MANAGER_TAB_HELPER_H_
#include "components/breadcrumbs/core/breadcrumb_manager_tab_helper.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
namespace content {
class NavigationHandle;
class WebContents;
} // namespace content
// Handles logging of Breadcrumb events associated with |web_contents_|.
class BreadcrumbManagerTabHelper
: public breadcrumbs::BreadcrumbManagerTabHelper,
public content::WebContentsObserver,
public content::WebContentsUserData<BreadcrumbManagerTabHelper> {
public:
~BreadcrumbManagerTabHelper() override;
BreadcrumbManagerTabHelper(const BreadcrumbManagerTabHelper&) = delete;
BreadcrumbManagerTabHelper& operator=(const BreadcrumbManagerTabHelper&) =
delete;
private:
friend class content::WebContentsUserData<BreadcrumbManagerTabHelper>;
explicit BreadcrumbManagerTabHelper(content::WebContents* web_contents);
// breadcrumbs::BreadcrumbManagerTabHelper:
void PlatformLogEvent(const std::string& event) override;
// content::WebContentsObserver:
void DidStartNavigation(
content::NavigationHandle* navigation_handle) override;
void DidFinishNavigation(
content::NavigationHandle* navigation_handle) override;
void DidFinishLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url) override;
void DidFailLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code) override;
void DidChangeVisibleSecurityState() override;
void PrimaryMainFrameRenderProcessGone(
base::TerminationStatus status) override;
WEB_CONTENTS_USER_DATA_KEY_DECL();
};
#endif // CHROME_BROWSER_BREADCRUMBS_BREADCRUMB_MANAGER_TAB_HELPER_H_