blob: 9e5d256c40880b651343e1a9c3028c6225e5ff6b (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
// Copyright (c) 2011 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 CONTENT_BROWSER_TAB_CONTENTS_PROVISIONAL_LOAD_DETAILS_H_
#define CONTENT_BROWSER_TAB_CONTENTS_PROVISIONAL_LOAD_DETAILS_H_
#pragma once
#include <string>
#include "base/basictypes.h"
#include "content/public/common/page_transition_types.h"
#include "googleurl/src/gurl.h"
#include "net/base/cert_status_flags.h"
// This class captures some of the information associated to the provisional
// load of a frame. It is provided as Details with the
// NOTIFY_FAIL_PROVISIONAL_LOAD_WITH_ERROR notification
// (see notification_types.h).
// TODO(brettw) this mostly duplicates
// NavigationController::LoadCommittedDetails, it would be nice to unify these
// somehow.
class ProvisionalLoadDetails {
public:
ProvisionalLoadDetails(bool main_frame,
bool in_page_navigation,
const GURL& url,
const std::string& security_info,
bool is_error_page,
int64 frame_id);
virtual ~ProvisionalLoadDetails() { }
void set_error_code(int error_code) { error_code_ = error_code; }
int error_code() const { return error_code_; }
void set_transition_type(content::PageTransition transition_type) {
transition_type_ = transition_type;
}
content::PageTransition transition_type() const {
return transition_type_;
}
const GURL& url() const { return url_; }
bool main_frame() const { return is_main_frame_; }
bool in_page_navigation() const { return is_in_page_navigation_; }
int ssl_cert_id() const { return ssl_cert_id_; }
net::CertStatus ssl_cert_status() const { return ssl_cert_status_; }
int ssl_security_bits() const { return ssl_security_bits_; }
int ssl_connection_status() const { return ssl_connection_status_; }
bool is_error_page() const { return is_error_page_; }
int64 frame_id() const { return frame_id_; }
private:
int error_code_;
content::PageTransition transition_type_;
GURL url_;
bool is_main_frame_;
bool is_in_page_navigation_;
int ssl_cert_id_;
net::CertStatus ssl_cert_status_;
int ssl_security_bits_;
int ssl_connection_status_;
bool is_error_page_;
int64 frame_id_;
DISALLOW_COPY_AND_ASSIGN(ProvisionalLoadDetails);
};
#endif // CONTENT_BROWSER_TAB_CONTENTS_PROVISIONAL_LOAD_DETAILS_H_
|