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

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

Issue 10692067: Convert PyAuto's NavigateToURL, GetActiveTabIndex, Refresh, RefreshActiveTab, and AppendTab to the … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Nirnimesh's comments. Created 8 years, 5 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
Index: chrome/browser/automation/automation_provider_observers.cc
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 5ea90fce8f906c69b29e89c919c9cddf272999d3..ab814e0b2ab5e890ddac5e2efb23721da3e80aa3 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -397,19 +397,22 @@ void TabStripNotificationObserver::Observe(
}
TabAppendedNotificationObserver::TabAppendedNotificationObserver(
- Browser* parent, AutomationProvider* automation,
- IPC::Message* reply_message)
+ Browser* parent,
+ AutomationProvider* automation,
+ IPC::Message* reply_message,
+ bool use_json_interface)
: TabStripNotificationObserver(chrome::NOTIFICATION_TAB_PARENTED,
automation),
parent_(parent),
- reply_message_(reply_message) {
+ reply_message_(reply_message),
+ use_json_interface_(use_json_interface) {
}
TabAppendedNotificationObserver::~TabAppendedNotificationObserver() {}
void TabAppendedNotificationObserver::ObserveTab(
NavigationController* controller) {
- if (!automation_)
+ if (!automation_ || !reply_message_.get())
return;
if (automation_->GetIndexForNavigationController(controller, parent_) ==
@@ -420,7 +423,11 @@ void TabAppendedNotificationObserver::ObserveTab(
new NavigationNotificationObserver(controller, automation_,
reply_message_.release(),
- 1, false, false);
+ 1, false, use_json_interface_);
+}
+
+IPC::Message* TabAppendedNotificationObserver::ReleaseReply() {
+ return reply_message_.release();
}
TabClosedNotificationObserver::TabClosedNotificationObserver(
@@ -3100,4 +3107,3 @@ void BrowserOpenedWithExistingProfileNotificationObserver::Observe(
NOTREACHED();
}
}
-
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.h ('k') | chrome/browser/automation/testing_automation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698