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

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

Issue 1167163002: chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing message_loop.h includes. Created 5 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/renderer/chrome_mock_render_thread.h" 5 #include "chrome/renderer/chrome_mock_render_thread.h"
6 6
7 #include "base/single_thread_task_runner.h"
7 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
8 9
9 #if defined(ENABLE_EXTENSIONS) 10 #if defined(ENABLE_EXTENSIONS)
10 #include "extensions/common/extension_messages.h" 11 #include "extensions/common/extension_messages.h"
11 #endif 12 #endif
12 13
13 ChromeMockRenderThread::ChromeMockRenderThread() { 14 ChromeMockRenderThread::ChromeMockRenderThread() {
14 } 15 }
15 16
16 ChromeMockRenderThread::~ChromeMockRenderThread() { 17 ChromeMockRenderThread::~ChromeMockRenderThread() {
17 } 18 }
18 19
19 scoped_refptr<base::SingleThreadTaskRunner> 20 scoped_refptr<base::SingleThreadTaskRunner>
20 ChromeMockRenderThread::GetIOMessageLoopProxy() { 21 ChromeMockRenderThread::GetIOMessageLoopProxy() {
21 return io_message_loop_proxy_; 22 return io_task_runner_;
22 } 23 }
23 24
24 void ChromeMockRenderThread::set_io_message_loop_proxy( 25 void ChromeMockRenderThread::set_io_message_loop_proxy(
25 const scoped_refptr<base::MessageLoopProxy>& proxy) { 26 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) {
26 io_message_loop_proxy_ = proxy; 27 io_task_runner_ = task_runner;
27 } 28 }
28 29
29 bool ChromeMockRenderThread::OnMessageReceived(const IPC::Message& msg) { 30 bool ChromeMockRenderThread::OnMessageReceived(const IPC::Message& msg) {
30 if (content::MockRenderThread::OnMessageReceived(msg)) 31 if (content::MockRenderThread::OnMessageReceived(msg))
31 return true; 32 return true;
32 33
33 // Some messages we do special handling. 34 // Some messages we do special handling.
34 #if defined(ENABLE_EXTENSIONS) 35 #if defined(ENABLE_EXTENSIONS)
35 bool handled = true; 36 bool handled = true;
36 IPC_BEGIN_MESSAGE_MAP(ChromeMockRenderThread, msg) 37 IPC_BEGIN_MESSAGE_MAP(ChromeMockRenderThread, msg)
(...skipping 10 matching lines...) Expand all
47 #if defined(ENABLE_EXTENSIONS) 48 #if defined(ENABLE_EXTENSIONS)
48 void ChromeMockRenderThread::OnOpenChannelToExtension( 49 void ChromeMockRenderThread::OnOpenChannelToExtension(
49 int routing_id, 50 int routing_id,
50 const ExtensionMsg_ExternalConnectionInfo& info, 51 const ExtensionMsg_ExternalConnectionInfo& info,
51 const std::string& channel_name, 52 const std::string& channel_name,
52 bool include_tls_channel_id, 53 bool include_tls_channel_id,
53 int* port_id) { 54 int* port_id) {
54 *port_id = 0; 55 *port_id = 0;
55 } 56 }
56 #endif 57 #endif
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_mock_render_thread.h ('k') | chrome/renderer/chrome_render_process_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698