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

Side by Side Diff: extensions/browser/api/web_view/web_view_internal_api.cc

Issue 597753003: Implement find in page support for top level BrowserPlugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/api/web_view/web_view_internal_api.h" 5 #include "extensions/browser/api/web_view/web_view_internal_api.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 // Set the find options to their default values. 260 // Set the find options to their default values.
261 blink::WebFindOptions options; 261 blink::WebFindOptions options;
262 if (params->options) { 262 if (params->options) {
263 options.forward = 263 options.forward =
264 params->options->backward ? !*params->options->backward : true; 264 params->options->backward ? !*params->options->backward : true;
265 options.matchCase = 265 options.matchCase =
266 params->options->match_case ? *params->options->match_case : false; 266 params->options->match_case ? *params->options->match_case : false;
267 } 267 }
268 268
269 guest->Find(search_text, options, this); 269 guest->StartFinding(search_text, options, this);
270 return true; 270 return true;
271 } 271 }
272 272
273 WebViewInternalStopFindingFunction::WebViewInternalStopFindingFunction() { 273 WebViewInternalStopFindingFunction::WebViewInternalStopFindingFunction() {
274 } 274 }
275 275
276 WebViewInternalStopFindingFunction::~WebViewInternalStopFindingFunction() { 276 WebViewInternalStopFindingFunction::~WebViewInternalStopFindingFunction() {
277 } 277 }
278 278
279 bool WebViewInternalStopFindingFunction::RunAsyncSafe(WebViewGuest* guest) { 279 bool WebViewInternalStopFindingFunction::RunAsyncSafe(WebViewGuest* guest) {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 // Will finish asynchronously. 513 // Will finish asynchronously.
514 return true; 514 return true;
515 } 515 }
516 516
517 void WebViewInternalClearDataFunction::ClearDataDone() { 517 void WebViewInternalClearDataFunction::ClearDataDone() {
518 Release(); // Balanced in RunAsync(). 518 Release(); // Balanced in RunAsync().
519 SendResponse(true); 519 SendResponse(true);
520 } 520 }
521 521
522 } // namespace extensions 522 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698