| 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_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_match.h" | 10 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 bool ReadStylesFromValue(const ListValue& value); | 54 bool ReadStylesFromValue(const ListValue& value); |
| 55 | 55 |
| 56 // The text that gets put in the edit box. | 56 // The text that gets put in the edit box. |
| 57 string16 content; | 57 string16 content; |
| 58 | 58 |
| 59 // The text that is displayed in the drop down. | 59 // The text that is displayed in the drop down. |
| 60 string16 description; | 60 string16 description; |
| 61 | 61 |
| 62 // Contains style ranges for the description. | 62 // Contains style ranges for the description. |
| 63 ACMatchClassifications description_styles; | 63 ACMatchClassifications description_styles; |
| 64 | |
| 65 private: | |
| 66 // Helper function to add the given style to the running list of | |
| 67 // |description_styles|. | |
| 68 void InsertNewStyle(int type, size_t offset, size_t length); | |
| 69 }; | 64 }; |
| 70 | 65 |
| 71 struct ExtensionOmniboxSuggestions { | 66 struct ExtensionOmniboxSuggestions { |
| 72 ExtensionOmniboxSuggestions(); | 67 ExtensionOmniboxSuggestions(); |
| 73 ~ExtensionOmniboxSuggestions(); | 68 ~ExtensionOmniboxSuggestions(); |
| 74 | 69 |
| 75 int request_id; | 70 int request_id; |
| 76 std::vector<ExtensionOmniboxSuggestion> suggestions; | 71 std::vector<ExtensionOmniboxSuggestion> suggestions; |
| 77 | 72 |
| 78 private: | 73 private: |
| 79 // This class is passed around by pointer. | 74 // This class is passed around by pointer. |
| 80 DISALLOW_COPY_AND_ASSIGN(ExtensionOmniboxSuggestions); | 75 DISALLOW_COPY_AND_ASSIGN(ExtensionOmniboxSuggestions); |
| 81 }; | 76 }; |
| 82 | 77 |
| 83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ | 78 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ |
| OLD | NEW |