OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_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 "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "content/common/content_export.h" |
13 #include "content/common/page_transition_types.h" | 14 #include "content/common/page_transition_types.h" |
14 #include "content/common/page_type.h" | 15 #include "content/common/page_type.h" |
15 #include "content/common/security_style.h" | 16 #include "content/common/security_style.h" |
16 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
17 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
18 | 19 |
19 class SiteInstance; | 20 class SiteInstance; |
20 | 21 |
21 //////////////////////////////////////////////////////////////////////////////// | 22 //////////////////////////////////////////////////////////////////////////////// |
22 // | 23 // |
23 // NavigationEntry class | 24 // NavigationEntry class |
24 // | 25 // |
25 // A NavigationEntry is a data structure that captures all the information | 26 // A NavigationEntry is a data structure that captures all the information |
26 // required to recreate a browsing state. This includes some opaque binary | 27 // required to recreate a browsing state. This includes some opaque binary |
27 // state as provided by the TabContents as well as some clear text title and | 28 // state as provided by the TabContents as well as some clear text title and |
28 // URL which is used for our user interface. | 29 // URL which is used for our user interface. |
29 // | 30 // |
30 //////////////////////////////////////////////////////////////////////////////// | 31 //////////////////////////////////////////////////////////////////////////////// |
31 class NavigationEntry { | 32 class CONTENT_EXPORT NavigationEntry { |
32 public: | 33 public: |
33 // SSL ----------------------------------------------------------------------- | 34 // SSL ----------------------------------------------------------------------- |
34 | 35 |
35 // Collects the SSL information for this NavigationEntry. | 36 // Collects the SSL information for this NavigationEntry. |
36 class SSLStatus { | 37 class SSLStatus { |
37 public: | 38 public: |
38 // Flags used for the page security content status. | 39 // Flags used for the page security content status. |
39 enum ContentStatusFlags { | 40 enum ContentStatusFlags { |
40 // HTTP page, or HTTPS page with no insecure content. | 41 // HTTP page, or HTTPS page with no insecure content. |
41 NORMAL_CONTENT = 0, | 42 NORMAL_CONTENT = 0, |
42 | 43 |
43 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). | 44 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). |
44 DISPLAYED_INSECURE_CONTENT = 1 << 0, | 45 DISPLAYED_INSECURE_CONTENT = 1 << 0, |
45 | 46 |
46 // HTTPS page containing "executed" HTTP resources (i.e. script). | 47 // HTTPS page containing "executed" HTTP resources (i.e. script). |
47 // Also currently used for HTTPS page containing broken-HTTPS resources; | 48 // Also currently used for HTTPS page containing broken-HTTPS resources; |
48 // this is wrong and should be fixed (see comments in | 49 // this is wrong and should be fixed (see comments in |
49 // SSLPolicy::OnRequestStarted()). | 50 // SSLPolicy::OnRequestStarted()). |
50 RAN_INSECURE_CONTENT = 1 << 1, | 51 RAN_INSECURE_CONTENT = 1 << 1, |
51 }; | 52 }; |
52 | 53 |
53 SSLStatus(); | 54 CONTENT_EXPORT SSLStatus(); |
54 | 55 |
55 bool Equals(const SSLStatus& status) const { | 56 bool Equals(const SSLStatus& status) const { |
56 return security_style_ == status.security_style_ && | 57 return security_style_ == status.security_style_ && |
57 cert_id_ == status.cert_id_ && | 58 cert_id_ == status.cert_id_ && |
58 cert_status_ == status.cert_status_ && | 59 cert_status_ == status.cert_status_ && |
59 security_bits_ == status.security_bits_ && | 60 security_bits_ == status.security_bits_ && |
60 content_status_ == status.content_status_; | 61 content_status_ == status.content_status_; |
61 } | 62 } |
62 | 63 |
63 void set_security_style(SecurityStyle security_style) { | 64 void set_security_style(SecurityStyle security_style) { |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 // This is a cached version of the result of GetTitleForDisplay. It prevents | 432 // This is a cached version of the result of GetTitleForDisplay. It prevents |
432 // us from having to do URL formatting on the URL every time the title is | 433 // us from having to do URL formatting on the URL every time the title is |
433 // displayed. When the URL, virtual URL, or title is set, this should be | 434 // displayed. When the URL, virtual URL, or title is set, this should be |
434 // cleared to force a refresh. | 435 // cleared to force a refresh. |
435 mutable string16 cached_display_title_; | 436 mutable string16 cached_display_title_; |
436 | 437 |
437 // Copy and assignment is explicitly allowed for this class. | 438 // Copy and assignment is explicitly allowed for this class. |
438 }; | 439 }; |
439 | 440 |
440 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 441 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
OLD | NEW |