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

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

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/testing_automation_provider.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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 bool AutomationProvider::Send(IPC::Message* msg) { 464 bool AutomationProvider::Send(IPC::Message* msg) {
465 DCHECK(channel_.get()); 465 DCHECK(channel_.get());
466 return channel_->Send(msg); 466 return channel_->Send(msg);
467 } 467 }
468 468
469 Browser* AutomationProvider::FindAndActivateTab( 469 Browser* AutomationProvider::FindAndActivateTab(
470 NavigationController* controller) { 470 NavigationController* controller) {
471 content::WebContentsDelegate* d = controller->GetWebContents()->GetDelegate(); 471 content::WebContentsDelegate* d = controller->GetWebContents()->GetDelegate();
472 if (d) 472 if (d)
473 d->ActivateContents(controller->GetWebContents()); 473 d->ActivateContents(controller->GetWebContents());
474 return browser::FindBrowserWithWebContents(controller->GetWebContents()); 474 return chrome::FindBrowserWithWebContents(controller->GetWebContents());
475 } 475 }
476 476
477 void AutomationProvider::HandleFindRequest( 477 void AutomationProvider::HandleFindRequest(
478 int handle, 478 int handle,
479 const AutomationMsg_Find_Params& params, 479 const AutomationMsg_Find_Params& params,
480 IPC::Message* reply_message) { 480 IPC::Message* reply_message) {
481 if (!tab_tracker_->ContainsHandle(handle)) { 481 if (!tab_tracker_->ContainsHandle(handle)) {
482 AutomationMsg_Find::WriteReplyParams(reply_message, -1, -1); 482 AutomationMsg_Find::WriteReplyParams(reply_message, -1, -1);
483 Send(reply_message); 483 Send(reply_message);
484 return; 484 return;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 747
748 return NULL; 748 return NULL;
749 } 749 }
750 750
751 void AutomationProvider::SaveAsAsync(int tab_handle) { 751 void AutomationProvider::SaveAsAsync(int tab_handle) {
752 NavigationController* tab = NULL; 752 NavigationController* tab = NULL;
753 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 753 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
754 if (web_contents) 754 if (web_contents)
755 web_contents->OnSavePage(); 755 web_contents->OnSavePage();
756 } 756 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698