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_NAVIGATION_ENTRY_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // https sub-resources with cert errors. | 93 // https sub-resources with cert errors. |
94 void set_has_unsafe_content() { | 94 void set_has_unsafe_content() { |
95 content_status_ |= UNSAFE_CONTENT; | 95 content_status_ |= UNSAFE_CONTENT; |
96 } | 96 } |
97 bool has_unsafe_content() const { | 97 bool has_unsafe_content() const { |
98 return (content_status_ & UNSAFE_CONTENT) != 0; | 98 return (content_status_ & UNSAFE_CONTENT) != 0; |
99 } | 99 } |
100 | 100 |
101 // Raw accessors for all the content status flags. This contains a | 101 // Raw accessors for all the content status flags. This contains a |
102 // combination of any of the ContentStatusFlags defined above. It is used | 102 // combination of any of the ContentStatusFlags defined above. It is used |
103 // by the UI tests for checking and for certain copying. Use the per-status | 103 // by some tests for checking and for certain copying. Use the per-status |
104 // functions for normal usage. | 104 // functions for normal usage. |
105 void set_content_status(int content_status) { | 105 void set_content_status(int content_status) { |
106 content_status_ = content_status; | 106 content_status_ = content_status; |
107 } | 107 } |
108 int content_status() const { | 108 int content_status() const { |
109 return content_status_; | 109 return content_status_; |
110 } | 110 } |
111 | 111 |
112 private: | 112 private: |
113 // See the accessors above for descriptions. | 113 // See the accessors above for descriptions. |
114 SecurityStyle security_style_; | 114 SecurityStyle security_style_; |
115 int cert_id_; | 115 int cert_id_; |
116 int cert_status_; | 116 int cert_status_; |
117 int security_bits_; | 117 int security_bits_; |
118 int content_status_; | 118 int content_status_; |
119 | 119 |
120 // Copy and assignment is explicitly allowed for this class. | 120 // Copy and assignment is explicitly allowed for this class. |
121 }; | 121 }; |
122 | 122 |
123 // The type of the page an entry corresponds to. Used by ui tests. | 123 // The type of the page an entry corresponds to. Used by tests. |
124 enum PageType { | 124 enum PageType { |
125 NORMAL_PAGE = 0, | 125 NORMAL_PAGE = 0, |
126 ERROR_PAGE, | 126 ERROR_PAGE, |
127 INTERSTITIAL_PAGE | 127 INTERSTITIAL_PAGE |
128 }; | 128 }; |
129 | 129 |
130 // Favicon ------------------------------------------------------------------- | 130 // Favicon ------------------------------------------------------------------- |
131 | 131 |
132 // Collects the favicon related information for a NavigationEntry. | 132 // Collects the favicon related information for a NavigationEntry. |
133 class FaviconStatus { | 133 class FaviconStatus { |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 // This is a cached version of the result of GetTitleForDisplay. It prevents | 409 // This is a cached version of the result of GetTitleForDisplay. It prevents |
410 // us from having to do URL formatting on the URL evey time the title is | 410 // us from having to do URL formatting on the URL evey time the title is |
411 // displayed. When the URL, display URL, or title is set, this should be | 411 // displayed. When the URL, display URL, or title is set, this should be |
412 // cleared to force a refresh. | 412 // cleared to force a refresh. |
413 string16 cached_display_title_; | 413 string16 cached_display_title_; |
414 | 414 |
415 // Copy and assignment is explicitly allowed for this class. | 415 // Copy and assignment is explicitly allowed for this class. |
416 }; | 416 }; |
417 | 417 |
418 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 418 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
OLD | NEW |