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

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: review comments 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)
@@ -73,7 +73,6 @@
#include "chrome/browser/plugin_prefs.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/printing/print_preview_tab_controller.h"
-#include "chrome/browser/printing/print_view_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -427,7 +426,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 +1688,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,
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/browser/printing/printing_layout_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698