| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PAGE_INFO_MODEL_H_ | 5 #ifndef CHROME_BROWSER_PAGE_INFO_MODEL_H_ |
| 6 #define CHROME_BROWSER_PAGE_INFO_MODEL_H_ | 6 #define CHROME_BROWSER_PAGE_INFO_MODEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 protected: | 28 protected: |
| 29 virtual ~PageInfoModelObserver() {} | 29 virtual ~PageInfoModelObserver() {} |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 enum SectionInfoType { | 32 enum SectionInfoType { |
| 33 SECTION_INFO_IDENTITY = 0, | 33 SECTION_INFO_IDENTITY = 0, |
| 34 SECTION_INFO_CONNECTION, | 34 SECTION_INFO_CONNECTION, |
| 35 SECTION_INFO_FIRST_VISIT, | 35 SECTION_INFO_FIRST_VISIT, |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 enum SectionInfoState { |
| 39 SECTION_STATE_OK = 0, |
| 40 // If state is OK but contains mixed content. |
| 41 SECTION_STATE_WARNING, |
| 42 // For example, unverified identity over HTTPS. |
| 43 SECTION_STATE_ERROR, |
| 44 }; |
| 45 |
| 38 struct SectionInfo { | 46 struct SectionInfo { |
| 39 SectionInfo(bool state, | 47 SectionInfo(SectionInfoState state, |
| 40 const string16& title, | 48 const string16& title, |
| 41 const string16& headline, | 49 const string16& headline, |
| 42 const string16& description, | 50 const string16& description, |
| 43 SectionInfoType type) | 51 SectionInfoType type) |
| 44 : state(state), | 52 : state(state), |
| 45 title(title), | 53 title(title), |
| 46 headline(headline), | 54 headline(headline), |
| 47 description(description), | 55 description(description), |
| 48 type(type) { | 56 type(type) { |
| 49 } | 57 } |
| 50 | 58 |
| 51 bool state; // True if state is OK, false otherwise (ex of bad states: | 59 // The overall state of the connection (error, warning, ok). |
| 52 // unverified identity over HTTPS). | 60 SectionInfoState state; |
| 53 | 61 |
| 54 // The title of the section. | 62 // The title of the section. |
| 55 string16 title; | 63 string16 title; |
| 56 | 64 |
| 57 // A single line describing the section, optional. | 65 // A single line describing the section, optional. |
| 58 string16 headline; | 66 string16 headline; |
| 59 | 67 |
| 60 // The full description of what this section is. | 68 // The full description of what this section is. |
| 61 string16 description; | 69 string16 description; |
| 62 | 70 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 91 std::vector<SectionInfo> sections_; | 99 std::vector<SectionInfo> sections_; |
| 92 | 100 |
| 93 // Used to request number of visits. | 101 // Used to request number of visits. |
| 94 CancelableRequestConsumer request_consumer_; | 102 CancelableRequestConsumer request_consumer_; |
| 95 | 103 |
| 96 private: | 104 private: |
| 97 DISALLOW_COPY_AND_ASSIGN(PageInfoModel); | 105 DISALLOW_COPY_AND_ASSIGN(PageInfoModel); |
| 98 }; | 106 }; |
| 99 | 107 |
| 100 #endif // CHROME_BROWSER_PAGE_INFO_MODEL_H_ | 108 #endif // CHROME_BROWSER_PAGE_INFO_MODEL_H_ |
| OLD | NEW |