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

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

Issue 9323071: Use InterstitialPage through a delegate interface instead of deriving from it. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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 | « no previous file | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider.cc
===================================================================
--- chrome/browser/automation/testing_automation_provider.cc (revision 120576)
+++ chrome/browser/automation/testing_automation_provider.cc (working copy)
@@ -125,6 +125,7 @@
#include "content/public/browser/browser_child_process_host_iterator.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/favicon_status.h"
+#include "content/public/browser/interstitial_page_delegate.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/plugin_service.h"
@@ -195,19 +196,21 @@
ui_controls::SendMouseClick(button);
}
-class AutomationInterstitialPage : public InterstitialPage {
+class AutomationInterstitialPage : public content::InterstitialPageDelegate {
public:
AutomationInterstitialPage(WebContents* tab,
const GURL& url,
const std::string& contents)
- : InterstitialPage(tab, true, url),
- contents_(contents) {
+ : contents_(contents) {
+ interstitial_page_ = InterstitialPage::Create(tab, true, url , this);
Avi (use Gerrit) 2012/02/06 19:27:05 space after |url|
+ interstitial_page_->Show();
}
- virtual std::string GetHTMLContents() { return contents_; }
+ virtual std::string GetHTMLContents() OVERRIDE { return contents_; }
private:
const std::string contents_;
+ InterstitialPage* interstitial_page_; // Owns us.
DISALLOW_COPY_AND_ASSIGN(AutomationInterstitialPage);
};
@@ -1586,11 +1589,8 @@
new NavigationNotificationObserver(controller, this, reply_message, 1,
false, false);
- AutomationInterstitialPage* interstitial =
- new AutomationInterstitialPage(web_contents,
- GURL("about:interstitial"),
- html_text);
- interstitial->Show();
+ new AutomationInterstitialPage(
+ web_contents, GURL("about:interstitial"), html_text);
return;
}
« no previous file with comments | « no previous file | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698