OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ios/chrome/browser/ui/contextual_search/contextual_search_context.h" |
| 6 |
| 7 ContextualSearchContext::ContextualSearchContext( |
| 8 const std::string& selected_text, |
| 9 const bool use_resolved_search_term, |
| 10 const GURL& page_url, |
| 11 const std::string& encoding) |
| 12 : selected_text(selected_text), |
| 13 use_resolved_search_term(use_resolved_search_term), |
| 14 page_url(page_url), |
| 15 encoding(encoding), |
| 16 start_offset(-1), |
| 17 end_offset(-1) {} |
| 18 |
| 19 ContextualSearchContext::~ContextualSearchContext() {} |
| 20 |
| 21 bool ContextualSearchContext::HasSurroundingText() { |
| 22 return start_offset != -1 && end_offset != -1 && !surrounding_text.empty(); |
| 23 } |
OLD | NEW |