| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TAB_CONTENTS_PROVISIONAL_LOAD_DETAILS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_PROVISIONAL_LOAD_DETAILS_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_PROVISIONAL_LOAD_DETAILS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_PROVISIONAL_LOAD_DETAILS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "chrome/common/page_transition_types.h" | |
| 13 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
| 14 | 13 |
| 15 // This class captures some of the information associated to the provisional | 14 // This class captures some of the information associated to the provisional |
| 16 // load of a frame. It is provided as Details with the | 15 // load of a frame. It is provided as Details with the |
| 17 // NOTIFY_FRAME_PROVISIONAL_LOAD_START, NOTIFY_FRAME_PROVISIONAL_LOAD_COMMITTED | 16 // NOTIFY_FRAME_PROVISIONAL_LOAD_START, NOTIFY_FRAME_PROVISIONAL_LOAD_COMMITTED |
| 18 // and NOTIFY_FAIL_PROVISIONAL_LOAD_WITH_ERROR notifications | 17 // and NOTIFY_FAIL_PROVISIONAL_LOAD_WITH_ERROR notifications |
| 19 // (see notification_types.h). | 18 // (see notification_types.h). |
| 20 | 19 |
| 21 // TODO(brettw) this mostly duplicates | 20 // TODO(brettw) this mostly duplicates |
| 22 // NavigationController::LoadCommittedDetails, it would be nice to unify these | 21 // NavigationController::LoadCommittedDetails, it would be nice to unify these |
| 23 // somehow. | 22 // somehow. |
| 24 class ProvisionalLoadDetails { | 23 class ProvisionalLoadDetails { |
| 25 public: | 24 public: |
| 26 ProvisionalLoadDetails(bool main_frame, | 25 ProvisionalLoadDetails(bool main_frame, |
| 27 bool in_page_navigation, | 26 bool in_page_navigation, |
| 28 const GURL& url, | 27 const GURL& url, |
| 29 const std::string& security_info, | 28 const std::string& security_info, |
| 30 bool is_filtered); | 29 bool is_filtered); |
| 31 virtual ~ProvisionalLoadDetails() { } | 30 virtual ~ProvisionalLoadDetails() { } |
| 32 | 31 |
| 33 void set_error_code(int error_code) { error_code_ = error_code; } | 32 void set_error_code(int error_code) { error_code_ = error_code; } |
| 34 int error_code() const { return error_code_; } | 33 int error_code() const { return error_code_; } |
| 35 | 34 |
| 36 void set_transition_type(PageTransition::Type transition_type) { | |
| 37 transition_type_ = transition_type; | |
| 38 } | |
| 39 PageTransition::Type transition_type() const { | |
| 40 return transition_type_; | |
| 41 } | |
| 42 | |
| 43 const GURL& url() const { return url_; } | 35 const GURL& url() const { return url_; } |
| 44 | 36 |
| 45 bool main_frame() const { return is_main_frame_; } | 37 bool main_frame() const { return is_main_frame_; } |
| 46 | 38 |
| 47 bool in_page_navigation() const { return is_in_page_navigation_; } | 39 bool in_page_navigation() const { return is_in_page_navigation_; } |
| 48 | 40 |
| 49 int ssl_cert_id() const { return ssl_cert_id_; } | 41 int ssl_cert_id() const { return ssl_cert_id_; } |
| 50 | 42 |
| 51 int ssl_cert_status() const { return ssl_cert_status_; } | 43 int ssl_cert_status() const { return ssl_cert_status_; } |
| 52 | 44 |
| 53 int ssl_security_bits() const { return ssl_security_bits_; } | 45 int ssl_security_bits() const { return ssl_security_bits_; } |
| 54 | 46 |
| 55 int ssl_connection_status() const { return ssl_connection_status_; } | 47 int ssl_connection_status() const { return ssl_connection_status_; } |
| 56 | 48 |
| 57 bool is_content_filtered() const { return is_content_filtered_; } | 49 bool is_content_filtered() const { return is_content_filtered_; } |
| 58 | 50 |
| 59 private: | 51 private: |
| 60 int error_code_; | 52 int error_code_; |
| 61 PageTransition::Type transition_type_; | |
| 62 GURL url_; | 53 GURL url_; |
| 63 bool is_main_frame_; | 54 bool is_main_frame_; |
| 64 bool is_in_page_navigation_; | 55 bool is_in_page_navigation_; |
| 65 int ssl_cert_id_; | 56 int ssl_cert_id_; |
| 66 int ssl_cert_status_; | 57 int ssl_cert_status_; |
| 67 int ssl_security_bits_; | 58 int ssl_security_bits_; |
| 68 int ssl_connection_status_; | 59 int ssl_connection_status_; |
| 69 bool is_content_filtered_; | 60 bool is_content_filtered_; |
| 70 | 61 |
| 71 DISALLOW_COPY_AND_ASSIGN(ProvisionalLoadDetails); | 62 DISALLOW_COPY_AND_ASSIGN(ProvisionalLoadDetails); |
| 72 }; | 63 }; |
| 73 | 64 |
| 74 #endif // CHROME_BROWSER_TAB_CONTENTS_PROVISIONAL_LOAD_DETAILS_H_ | 65 #endif // CHROME_BROWSER_TAB_CONTENTS_PROVISIONAL_LOAD_DETAILS_H_ |
| OLD | NEW |