| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "extensions/browser/guest_view/web_view/web_view_find_helper.h" | 5 #include "extensions/browser/guest_view/web_view/web_view_find_helper.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" | 
| 10 #include "components/guest_view/browser/guest_view_event.h" | 10 #include "components/guest_view/browser/guest_view_event.h" | 
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 275   return weak_ptr_factory_.GetWeakPtr(); | 275   return weak_ptr_factory_.GetWeakPtr(); | 
| 276 } | 276 } | 
| 277 | 277 | 
| 278 void WebViewFindHelper::FindInfo::SendResponse(bool canceled) { | 278 void WebViewFindHelper::FindInfo::SendResponse(bool canceled) { | 
| 279   // Prepare the find results to pass to the callback function. | 279   // Prepare the find results to pass to the callback function. | 
| 280   base::DictionaryValue results; | 280   base::DictionaryValue results; | 
| 281   find_results_.PrepareResults(&results); | 281   find_results_.PrepareResults(&results); | 
| 282   results.SetBoolean(webview::kFindCanceled, canceled); | 282   results.SetBoolean(webview::kFindCanceled, canceled); | 
| 283 | 283 | 
| 284   // Call the callback. | 284   // Call the callback. | 
| 285   find_function_->SetResult(results.DeepCopy()); | 285   find_function_->SetResult(results.CreateDeepCopy()); | 
| 286   find_function_->SendResponse(true); | 286   find_function_->SendResponse(true); | 
| 287 } | 287 } | 
| 288 | 288 | 
| 289 WebViewFindHelper::FindInfo::~FindInfo() {} | 289 WebViewFindHelper::FindInfo::~FindInfo() {} | 
| 290 | 290 | 
| 291 }  // namespace extensions | 291 }  // namespace extensions | 
| OLD | NEW | 
|---|