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

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: Removed GetActiveTabIndex from the SWIG interface file. 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 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 bff1f5c4def082bca8ada65456dda009c01fcefe..fd78085cf89f2e29753487cb35836bff3cdd802e 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -396,19 +396,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_) ==
@@ -419,7 +422,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(
@@ -3099,4 +3106,3 @@ void BrowserOpenedWithExistingProfileNotificationObserver::Observe(
NOTREACHED();
}
}
-

Powered by Google App Engine
This is Rietveld 408576698