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

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

Issue 10033001: Convert printing ui_tests to browser_tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/testing_automation_provider.cc
===================================================================
--- chrome/browser/automation/testing_automation_provider.cc (revision 131326)
+++ chrome/browser/automation/testing_automation_provider.cc (working copy)
@@ -427,7 +427,6 @@
IPC_MESSAGE_HANDLER(AutomationMsg_BringBrowserToFront, BringBrowserToFront)
IPC_MESSAGE_HANDLER(AutomationMsg_IsMenuCommandEnabled,
IsMenuCommandEnabled)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_PrintNow, PrintNow)
IPC_MESSAGE_HANDLER(AutomationMsg_SavePage, SavePage)
IPC_MESSAGE_HANDLER(AutomationMsg_OpenFindInPage,
HandleOpenFindInPageRequest)
@@ -1690,31 +1689,6 @@
}
}
-void TestingAutomationProvider::PrintNow(int tab_handle,
- IPC::Message* reply_message) {
- NavigationController* tab = NULL;
- WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
- if (web_contents) {
- FindAndActivateTab(tab);
-
- content::NotificationObserver* observer =
- new DocumentPrintedNotificationObserver(this, reply_message);
-
- TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(web_contents);
- if (!wrapper->print_view_manager()->PrintNow()) {
- // Clean up the observer. It will send the reply message.
- delete observer;
- }
-
- // Return now to avoid sending reply message twice.
- return;
- }
-
- AutomationMsg_PrintNow::WriteReplyParams(reply_message, false);
- Send(reply_message);
-}
-
void TestingAutomationProvider::SavePage(int tab_handle,
const FilePath& file_name,
const FilePath& dir_path,

Powered by Google App Engine
This is Rietveld 408576698