Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: chrome/browser/android/contextualsearch/contextual_search_delegate.h

Issue 2322793002: [Contextual Search] Fetch and display thumbnails returned in resolution response (Closed)
Patch Set: std::unique_ptr Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698