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

Unified Diff: chrome/browser/automation/automation_provider_json.cc

Issue 9085006: Replace Browser::GetTabContentsAt with GetWebContentsAt and update all callers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac yet again Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/automation/automation_provider_json.h ('k') | chrome/browser/automation/automation_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_provider_json.cc
===================================================================
--- chrome/browser/automation/automation_provider_json.cc (revision 116244)
+++ chrome/browser/automation/automation_provider_json.cc (working copy)
@@ -14,10 +14,11 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/automation_id.h"
#include "chrome/common/automation_messages.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
using automation::Error;
using automation::ErrorCode;
+using content::WebContents;
AutomationJSONReply::AutomationJSONReply(AutomationProvider* provider,
IPC::Message* reply_message)
@@ -70,7 +71,7 @@
AutomationId id;
if (!GetAutomationIdFromJSONArgs(args, "auto_id", &id, error))
return false;
- TabContents* tab;
+ WebContents* tab;
if (!automation_util::GetTabForId(id, &tab)) {
*error = "'auto_id' does not refer to an open tab";
return false;
@@ -98,7 +99,7 @@
bool GetTabFromJSONArgs(
DictionaryValue* args,
- TabContents** tab,
+ WebContents** tab,
std::string* error) {
if (args->HasKey("auto_id")) {
AutomationId id;
@@ -118,7 +119,7 @@
*error = "'tab_index' missing or invalid";
return false;
}
- *tab = automation_util::GetTabContentsAt(browser_index, tab_index);
+ *tab = automation_util::GetWebContentsAt(browser_index, tab_index);
if (!*tab) {
*error = "Cannot locate tab from given indices";
return false;
@@ -130,7 +131,7 @@
bool GetBrowserAndTabFromJSONArgs(
DictionaryValue* args,
Browser** browser,
- TabContents** tab,
+ WebContents** tab,
std::string* error) {
return GetBrowserFromJSONArgs(args, browser, error) &&
GetTabFromJSONArgs(args, tab, error);
@@ -165,7 +166,7 @@
}
} else {
// If the render view id is not specified, check for browser/tab indices.
- TabContents* tab = NULL;
+ WebContents* tab = NULL;
if (!GetTabFromJSONArgs(args, &tab, error))
return false;
*rvh = tab->GetRenderViewHost();
« no previous file with comments | « chrome/browser/automation/automation_provider_json.h ('k') | chrome/browser/automation/automation_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698