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

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

Issue 10535120: TabContentsWrapper -> TabContents, part 43. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_observers.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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 IPC::Message* reply_message) { 512 IPC::Message* reply_message) {
513 int request_id = FindInPageNotificationObserver::kFindInPageRequestId; 513 int request_id = FindInPageNotificationObserver::kFindInPageRequestId;
514 FindInPageNotificationObserver* observer = 514 FindInPageNotificationObserver* observer =
515 new FindInPageNotificationObserver(this, 515 new FindInPageNotificationObserver(this,
516 web_contents, 516 web_contents,
517 with_json, 517 with_json,
518 reply_message); 518 reply_message);
519 if (!with_json) { 519 if (!with_json) {
520 find_in_page_observer_.reset(observer); 520 find_in_page_observer_.reset(observer);
521 } 521 }
522 TabContents* tab_contents = 522 TabContents* tab_contents = TabContents::FromWebContents(web_contents);
523 TabContents::GetOwningTabContentsForWebContents(web_contents);
524 if (tab_contents) 523 if (tab_contents)
525 tab_contents->find_tab_helper()->set_current_find_request_id(request_id); 524 tab_contents->find_tab_helper()->set_current_find_request_id(request_id);
526 525
527 WebFindOptions options; 526 WebFindOptions options;
528 options.forward = forward; 527 options.forward = forward;
529 options.matchCase = match_case; 528 options.matchCase = match_case;
530 options.findNext = find_next; 529 options.findNext = find_next;
531 web_contents->GetRenderViewHost()->Find( 530 web_contents->GetRenderViewHost()->Find(
532 FindInPageNotificationObserver::kFindInPageRequestId, search_string, 531 FindInPageNotificationObserver::kFindInPageRequestId, search_string,
533 options); 532 options);
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 756
758 return NULL; 757 return NULL;
759 } 758 }
760 759
761 void AutomationProvider::SaveAsAsync(int tab_handle) { 760 void AutomationProvider::SaveAsAsync(int tab_handle) {
762 NavigationController* tab = NULL; 761 NavigationController* tab = NULL;
763 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 762 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
764 if (web_contents) 763 if (web_contents)
765 web_contents->OnSavePage(); 764 web_contents->OnSavePage();
766 } 765 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698