OLD | NEW |
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 #include "content/browser/renderer_host/mock_render_process_host.h" | 5 #include "content/browser/renderer_host/mock_render_process_host.h" |
6 | 6 |
7 #include "content/browser/child_process_security_policy.h" | 7 #include "content/browser/child_process_security_policy.h" |
8 | 8 |
9 MockRenderProcessHost::MockRenderProcessHost(Profile* profile) | 9 MockRenderProcessHost::MockRenderProcessHost(Profile* profile) |
10 : RenderProcessHost(profile), | 10 : RenderProcessHost(profile), |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // On Mac, TransportDIBs are always created in the browser, so we cannot map | 93 // On Mac, TransportDIBs are always created in the browser, so we cannot map |
94 // one from a dib_id. | 94 // one from a dib_id. |
95 transport_dib_ = TransportDIB::Create(100 * 100 * 4, 0); | 95 transport_dib_ = TransportDIB::Create(100 * 100 * 4, 0); |
96 #elif defined(OS_POSIX) | 96 #elif defined(OS_POSIX) |
97 transport_dib_ = TransportDIB::Map(dib_id.shmkey); | 97 transport_dib_ = TransportDIB::Map(dib_id.shmkey); |
98 #endif | 98 #endif |
99 | 99 |
100 return transport_dib_; | 100 return transport_dib_; |
101 } | 101 } |
102 | 102 |
| 103 void MockRenderProcessHost::SetCompositingSurface( |
| 104 int render_widget_id, |
| 105 gfx::PluginWindowHandle compositing_surface) { |
| 106 } |
| 107 |
103 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { | 108 bool MockRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { |
104 return false; | 109 return false; |
105 } | 110 } |
106 | 111 |
107 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { | 112 void MockRenderProcessHost::OnChannelConnected(int32 peer_pid) { |
108 } | 113 } |
109 | 114 |
110 MockRenderProcessHostFactory::MockRenderProcessHostFactory() {} | 115 MockRenderProcessHostFactory::MockRenderProcessHostFactory() {} |
111 | 116 |
112 MockRenderProcessHostFactory::~MockRenderProcessHostFactory() { | 117 MockRenderProcessHostFactory::~MockRenderProcessHostFactory() { |
(...skipping 17 matching lines...) Expand all Loading... |
130 | 135 |
131 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { | 136 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { |
132 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 137 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
133 it != processes_.end(); ++it) { | 138 it != processes_.end(); ++it) { |
134 if (*it == host) { | 139 if (*it == host) { |
135 processes_.weak_erase(it); | 140 processes_.weak_erase(it); |
136 break; | 141 break; |
137 } | 142 } |
138 } | 143 } |
139 } | 144 } |
OLD | NEW |