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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_find_helper.cc

Issue 1991083002: Remove ExtensionFunction::SetResult(T*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU Created 4 years, 7 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 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
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
OLDNEW
« chrome/browser/extensions/extension_tab_util.cc ('K') | « extensions/browser/extension_function.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698