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

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

Issue 663333002: Standardize usage of virtual/override/final in chrome/renderer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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"
(...skipping 10 matching lines...) Expand all
21 struct PrintHostMsg_DidPrintPage_Params; 21 struct PrintHostMsg_DidPrintPage_Params;
22 struct PrintHostMsg_ScriptedPrint_Params; 22 struct PrintHostMsg_ScriptedPrint_Params;
23 struct PrintMsg_PrintPages_Params; 23 struct PrintMsg_PrintPages_Params;
24 struct PrintMsg_Print_Params; 24 struct PrintMsg_Print_Params;
25 25
26 // Extends content::MockRenderThread to know about printing and 26 // Extends content::MockRenderThread to know about printing and
27 // extension messages. 27 // extension messages.
28 class ChromeMockRenderThread : public content::MockRenderThread { 28 class ChromeMockRenderThread : public content::MockRenderThread {
29 public: 29 public:
30 ChromeMockRenderThread(); 30 ChromeMockRenderThread();
31 virtual ~ChromeMockRenderThread(); 31 ~ChromeMockRenderThread() override;
32 32
33 // content::RenderThread overrides. 33 // content::RenderThread overrides.
34 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() 34 scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() override;
35 override;
36 35
37 ////////////////////////////////////////////////////////////////////////// 36 //////////////////////////////////////////////////////////////////////////
38 // The following functions are called by the test itself. 37 // The following functions are called by the test itself.
39 38
40 // Set IO message loop proxy. 39 // Set IO message loop proxy.
41 void set_io_message_loop_proxy( 40 void set_io_message_loop_proxy(
42 const scoped_refptr<base::MessageLoopProxy>& proxy); 41 const scoped_refptr<base::MessageLoopProxy>& proxy);
43 42
44 #if defined(ENABLE_PRINTING) 43 #if defined(ENABLE_PRINTING)
45 // Returns the pseudo-printer instance. 44 // Returns the pseudo-printer instance.
46 MockPrinter* printer(); 45 MockPrinter* printer();
47 46
48 // Call with |response| set to true if the user wants to print. 47 // Call with |response| set to true if the user wants to print.
49 // False if the user decides to cancel. 48 // False if the user decides to cancel.
50 void set_print_dialog_user_response(bool response); 49 void set_print_dialog_user_response(bool response);
51 50
52 // Cancel print preview when print preview has |page| remaining pages. 51 // Cancel print preview when print preview has |page| remaining pages.
53 void set_print_preview_cancel_page_number(int page); 52 void set_print_preview_cancel_page_number(int page);
54 53
55 // Get the number of pages to generate for print preview. 54 // Get the number of pages to generate for print preview.
56 int print_preview_pages_remaining() const; 55 int print_preview_pages_remaining() const;
57 #endif 56 #endif
58 57
59 private: 58 private:
60 // Overrides base class implementation to add custom handling for 59 // Overrides base class implementation to add custom handling for
61 // print and extensions. 60 // print and extensions.
62 virtual bool OnMessageReceived(const IPC::Message& msg) override; 61 bool OnMessageReceived(const IPC::Message& msg) override;
63 62
64 #if defined(ENABLE_EXTENSIONS) 63 #if defined(ENABLE_EXTENSIONS)
65 // The callee expects to be returned a valid channel_id. 64 // The callee expects to be returned a valid channel_id.
66 void OnOpenChannelToExtension(int routing_id, 65 void OnOpenChannelToExtension(int routing_id,
67 const ExtensionMsg_ExternalConnectionInfo& info, 66 const ExtensionMsg_ExternalConnectionInfo& info,
68 const std::string& channel_name, 67 const std::string& channel_name,
69 bool include_tls_channel_id, 68 bool include_tls_channel_id,
70 int* port_id); 69 int* port_id);
71 #endif 70 #endif
72 71
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Number of pages to generate for print preview. 113 // Number of pages to generate for print preview.
115 int print_preview_pages_remaining_; 114 int print_preview_pages_remaining_;
116 #endif 115 #endif
117 116
118 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 117 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
119 118
120 DISALLOW_COPY_AND_ASSIGN(ChromeMockRenderThread); 119 DISALLOW_COPY_AND_ASSIGN(ChromeMockRenderThread);
121 }; 120 };
122 121
123 #endif // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ 122 #endif // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/chrome_render_frame_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698