From 116d0963cadfbf55ef2ec3d13781987c4d80517a Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Fri, 24 Aug 2012 23:22:28 +0000 Subject: Print preview: Use an ID instead of memory pointer string in WebUI. BUG=144051 Review URL: https://chromiumcodereview.appspot.com/10870003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153342 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/chrome_mock_render_thread.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'chrome/renderer/chrome_mock_render_thread.h') diff --git a/chrome/renderer/chrome_mock_render_thread.h b/chrome/renderer/chrome_mock_render_thread.h index f0bef66..5db8826 100644 --- a/chrome/renderer/chrome_mock_render_thread.h +++ b/chrome/renderer/chrome_mock_render_thread.h @@ -8,16 +8,16 @@ #include #include "base/compiler_specific.h" -#include "chrome/common/extensions/extension_set.h" -#include "chrome/renderer/mock_printer.h" #include "content/public/test/mock_render_thread.h" namespace base { class DictionaryValue; } +class MockPrinter; struct PrintHostMsg_DidGetPreviewPageCount_Params; struct PrintHostMsg_DidPreviewPage_Params; +struct PrintHostMsg_DidPrintPage_Params; struct PrintHostMsg_ScriptedPrint_Params; struct PrintMsg_PrintPages_Params; struct PrintMsg_Print_Params; @@ -33,7 +33,7 @@ class ChromeMockRenderThread : public content::MockRenderThread { // The following functions are called by the test itself. // Returns the pseudo-printer instance. - MockPrinter* printer() const { return printer_.get(); } + MockPrinter* printer(); // Call with |response| set to true if the user wants to print. // False if the user decides to cancel. @@ -43,7 +43,7 @@ class ChromeMockRenderThread : public content::MockRenderThread { void set_print_preview_cancel_page_number(int page); // Get the number of pages to generate for print preview. - int print_preview_pages_remaining(); + int print_preview_pages_remaining() const; private: // Overrides base class implementation to add custom handling for @@ -51,10 +51,11 @@ class ChromeMockRenderThread : public content::MockRenderThread { virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; // The callee expects to be returned a valid channel_id. - void OnMsgOpenChannelToExtension( - int routing_id, const std::string& extension_id, - const std::string& source_extension_id, - const std::string& target_extension_id, int* port_id); + void OnMsgOpenChannelToExtension(int routing_id, + const std::string& extension_id, + const std::string& source_extension_id, + const std::string& target_extension_id, + int* port_id); #if defined(OS_CHROMEOS) void OnAllocateTempFileForPrinting(base::FileDescriptor* renderer_fd, @@ -74,7 +75,7 @@ class ChromeMockRenderThread : public content::MockRenderThread { void OnDidGetPreviewPageCount( const PrintHostMsg_DidGetPreviewPageCount_Params& params); void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params); - void OnCheckForCancel(const std::string& preview_ui_addr, + void OnCheckForCancel(int32 preview_ui_id, int preview_request_id, bool* cancel); -- cgit v1.1