| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_DELEGATE_H_ | 6 #define CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 // Decodes the given json response string and extracts parameters. | 186 // Decodes the given json response string and extracts parameters. |
| 187 void DecodeSearchTermFromJsonResponse(const std::string& response, | 187 void DecodeSearchTermFromJsonResponse(const std::string& response, |
| 188 std::string* search_term, | 188 std::string* search_term, |
| 189 std::string* display_text, | 189 std::string* display_text, |
| 190 std::string* alternate_term, | 190 std::string* alternate_term, |
| 191 std::string* mid, | 191 std::string* mid, |
| 192 std::string* prevent_preload, | 192 std::string* prevent_preload, |
| 193 int* mention_start, | 193 int* mention_start, |
| 194 int* mention_end, | 194 int* mention_end, |
| 195 std::string* context_language); | 195 std::string* context_language, |
| 196 std::string* thumbnail_url); |
| 196 | 197 |
| 197 // Extracts the start and end location from a mentions list, and sets the | 198 // Extracts the start and end location from a mentions list, and sets the |
| 198 // integers referenced by |startResult| and |endResult|. | 199 // integers referenced by |startResult| and |endResult|. |
| 199 void ExtractMentionsStartEnd(const base::ListValue& mentions_list, | 200 void ExtractMentionsStartEnd(const base::ListValue& mentions_list, |
| 200 int* startResult, | 201 int* startResult, |
| 201 int* endResult); | 202 int* endResult); |
| 202 | 203 |
| 203 // Generates a subset of the given surrounding_text string, for Icing | 204 // Generates a subset of the given surrounding_text string, for Icing |
| 204 // integration. | 205 // integration. |
| 205 // |surrounding_text| the entire text context that contains the selection. | 206 // |surrounding_text| the entire text context that contains the selection. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // The callback for notifications of Icing selection being available. | 239 // The callback for notifications of Icing selection being available. |
| 239 IcingCallback icing_callback_; | 240 IcingCallback icing_callback_; |
| 240 | 241 |
| 241 // Used to hold the context until an upcoming search term request is started. | 242 // Used to hold the context until an upcoming search term request is started. |
| 242 std::unique_ptr<ContextualSearchContext> context_; | 243 std::unique_ptr<ContextualSearchContext> context_; |
| 243 | 244 |
| 244 DISALLOW_COPY_AND_ASSIGN(ContextualSearchDelegate); | 245 DISALLOW_COPY_AND_ASSIGN(ContextualSearchDelegate); |
| 245 }; | 246 }; |
| 246 | 247 |
| 247 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_DELEGATE_H_ | 248 #endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_DELEGATE_H_ |
| OLD | NEW |