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

Side by Side Diff: chrome/renderer/chrome_mock_render_thread.h

Issue 14301016: Fix a couple of bugs relating to sending Tab info with chrome.runtime.connect and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add key to app1/manifest.json Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ 5 #ifndef CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_
6 #define CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ 6 #define CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "content/public/test/mock_render_thread.h" 11 #include "content/public/test/mock_render_thread.h"
12 12
13 namespace base { 13 namespace base {
14 class DictionaryValue; 14 class DictionaryValue;
15 } 15 }
16 16
17 class MockPrinter; 17 class MockPrinter;
18 struct ExtensionMsg_ExternalConnectionInfo;
18 struct PrintHostMsg_DidGetPreviewPageCount_Params; 19 struct PrintHostMsg_DidGetPreviewPageCount_Params;
19 struct PrintHostMsg_DidPreviewPage_Params; 20 struct PrintHostMsg_DidPreviewPage_Params;
20 struct PrintHostMsg_DidPrintPage_Params; 21 struct PrintHostMsg_DidPrintPage_Params;
21 struct PrintHostMsg_ScriptedPrint_Params; 22 struct PrintHostMsg_ScriptedPrint_Params;
22 struct PrintMsg_PrintPages_Params; 23 struct PrintMsg_PrintPages_Params;
23 struct PrintMsg_Print_Params; 24 struct PrintMsg_Print_Params;
24 25
25 // Extends content::MockRenderThread to know about printing and 26 // Extends content::MockRenderThread to know about printing and
26 // extension messages. 27 // extension messages.
27 class ChromeMockRenderThread : public content::MockRenderThread { 28 class ChromeMockRenderThread : public content::MockRenderThread {
(...skipping 17 matching lines...) Expand all
45 // Get the number of pages to generate for print preview. 46 // Get the number of pages to generate for print preview.
46 int print_preview_pages_remaining() const; 47 int print_preview_pages_remaining() const;
47 48
48 private: 49 private:
49 // Overrides base class implementation to add custom handling for 50 // Overrides base class implementation to add custom handling for
50 // print and extensions. 51 // print and extensions.
51 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 52 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
52 53
53 // The callee expects to be returned a valid channel_id. 54 // The callee expects to be returned a valid channel_id.
54 void OnOpenChannelToExtension(int routing_id, 55 void OnOpenChannelToExtension(int routing_id,
55 const std::string& extension_id, 56 const ExtensionMsg_ExternalConnectionInfo& info,
56 const std::string& source_extension_id, 57 const std::string& channel_name,
57 const std::string& target_extension_id,
58 int* port_id); 58 int* port_id);
59 59
60 #if defined(OS_CHROMEOS) 60 #if defined(OS_CHROMEOS)
61 void OnAllocateTempFileForPrinting(base::FileDescriptor* renderer_fd, 61 void OnAllocateTempFileForPrinting(base::FileDescriptor* renderer_fd,
62 int* browser_fd); 62 int* browser_fd);
63 void OnTempFileForPrintingWritten(int render_view_id, int browser_fd); 63 void OnTempFileForPrintingWritten(int render_view_id, int browser_fd);
64 #endif 64 #endif
65 65
66 // PrintWebViewHelper expects default print settings. 66 // PrintWebViewHelper expects default print settings.
67 void OnGetDefaultPrintSettings(PrintMsg_Print_Params* setting); 67 void OnGetDefaultPrintSettings(PrintMsg_Print_Params* setting);
(...skipping 25 matching lines...) Expand all
93 93
94 // Simulates cancelling print preview if |print_preview_pages_remaining_| 94 // Simulates cancelling print preview if |print_preview_pages_remaining_|
95 // equals this. 95 // equals this.
96 int print_preview_cancel_page_number_; 96 int print_preview_cancel_page_number_;
97 97
98 // Number of pages to generate for print preview. 98 // Number of pages to generate for print preview.
99 int print_preview_pages_remaining_; 99 int print_preview_pages_remaining_;
100 }; 100 };
101 101
102 #endif // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ 102 #endif // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/renderer/chrome_mock_render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698