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

Side by Side Diff: chrome/browser/automation/automation_provider.cc

Issue 128453002: Move Find Operations from RenderViewHost to WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed android build Created 6 years, 11 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
« no previous file with comments | « android_webview/browser/find_helper.cc ('k') | chrome/browser/ui/find_bar/find_tab_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 find_in_page_observer_.reset(observer); 436 find_in_page_observer_.reset(observer);
437 } 437 }
438 FindTabHelper* find_tab_helper = FindTabHelper::FromWebContents(web_contents); 438 FindTabHelper* find_tab_helper = FindTabHelper::FromWebContents(web_contents);
439 if (find_tab_helper) 439 if (find_tab_helper)
440 find_tab_helper->set_current_find_request_id(request_id); 440 find_tab_helper->set_current_find_request_id(request_id);
441 441
442 WebFindOptions options; 442 WebFindOptions options;
443 options.forward = forward; 443 options.forward = forward;
444 options.matchCase = match_case; 444 options.matchCase = match_case;
445 options.findNext = find_next; 445 options.findNext = find_next;
446 web_contents->GetRenderViewHost()->Find( 446 web_contents->Find(
447 FindInPageNotificationObserver::kFindInPageRequestId, search_string, 447 FindInPageNotificationObserver::kFindInPageRequestId, search_string,
448 options); 448 options);
449 } 449 }
450 450
451 WebContents* AutomationProvider::GetWebContentsForHandle( 451 WebContents* AutomationProvider::GetWebContentsForHandle(
452 int handle, NavigationController** tab) { 452 int handle, NavigationController** tab) {
453 if (tab_tracker_->ContainsHandle(handle)) { 453 if (tab_tracker_->ContainsHandle(handle)) {
454 NavigationController* nav_controller = tab_tracker_->GetResource(handle); 454 NavigationController* nav_controller = tab_tracker_->GetResource(handle);
455 if (tab) 455 if (tab)
456 *tab = nav_controller; 456 *tab = nav_controller;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 NOTREACHED(); 636 NOTREACHED();
637 return NULL; 637 return NULL;
638 } 638 }
639 639
640 RenderViewHost* view_host = web_contents->GetRenderViewHost(); 640 RenderViewHost* view_host = web_contents->GetRenderViewHost();
641 return view_host; 641 return view_host;
642 } 642 }
643 643
644 return NULL; 644 return NULL;
645 } 645 }
OLDNEW
« no previous file with comments | « android_webview/browser/find_helper.cc ('k') | chrome/browser/ui/find_bar/find_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698