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

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

Issue 464533002: Move guest_view to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small changes are made in guest_view_manager_unittest.cc Created 6 years, 4 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 "chrome/browser/guest_view/web_view/web_view_find_helper.h" 5 #include "chrome/browser/guest_view/web_view/web_view_find_helper.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/extensions/api/web_view/web_view_internal_api.h" 9 #include "chrome/browser/extensions/api/web_view/web_view_internal_api.h"
10 #include "chrome/browser/guest_view/web_view/web_view_constants.h" 10 #include "chrome/browser/guest_view/web_view/web_view_constants.h"
11 11
12 namespace extensions {
13
12 WebViewFindHelper::WebViewFindHelper(WebViewGuest* webview_guest) 14 WebViewFindHelper::WebViewFindHelper(WebViewGuest* webview_guest)
13 : webview_guest_(webview_guest), current_find_request_id_(0) { 15 : webview_guest_(webview_guest), current_find_request_id_(0) {
14 } 16 }
15 17
16 WebViewFindHelper::~WebViewFindHelper() { 18 WebViewFindHelper::~WebViewFindHelper() {
17 } 19 }
18 20
19 void WebViewFindHelper::CancelAllFindSessions() { 21 void WebViewFindHelper::CancelAllFindSessions() {
20 current_find_session_ = linked_ptr<WebViewFindHelper::FindInfo>(); 22 current_find_session_ = linked_ptr<WebViewFindHelper::FindInfo>();
21 while (!find_info_map_.empty()) { 23 while (!find_info_map_.empty()) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 void WebViewFindHelper::FindInfo::SendResponse(bool canceled) { 271 void WebViewFindHelper::FindInfo::SendResponse(bool canceled) {
270 // Prepare the find results to pass to the callback function. 272 // Prepare the find results to pass to the callback function.
271 base::DictionaryValue results; 273 base::DictionaryValue results;
272 find_results_.PrepareResults(&results); 274 find_results_.PrepareResults(&results);
273 results.SetBoolean(webview::kFindCanceled, canceled); 275 results.SetBoolean(webview::kFindCanceled, canceled);
274 276
275 // Call the callback. 277 // Call the callback.
276 find_function_->SetResult(results.DeepCopy()); 278 find_function_->SetResult(results.DeepCopy());
277 find_function_->SendResponse(true); 279 find_function_->SendResponse(true);
278 } 280 }
281
282 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/web_view/web_view_find_helper.h ('k') | chrome/browser/guest_view/web_view/web_view_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698