OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |