| 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 "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "content/browser/child_process_security_policy.h" | 10 #include "content/browser/child_process_security_policy.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // On Mac, TransportDIBs are always created in the browser, so we cannot map | 118 // On Mac, TransportDIBs are always created in the browser, so we cannot map |
| 119 // one from a dib_id. | 119 // one from a dib_id. |
| 120 transport_dib_ = TransportDIB::Create(100 * 100 * 4, 0); | 120 transport_dib_ = TransportDIB::Create(100 * 100 * 4, 0); |
| 121 #elif defined(OS_POSIX) | 121 #elif defined(OS_POSIX) |
| 122 transport_dib_ = TransportDIB::Map(dib_id.shmkey); | 122 transport_dib_ = TransportDIB::Map(dib_id.shmkey); |
| 123 #endif | 123 #endif |
| 124 | 124 |
| 125 return transport_dib_; | 125 return transport_dib_; |
| 126 } | 126 } |
| 127 | 127 |
| 128 void MockRenderProcessHost::SetCompositingSurface( | |
| 129 int render_widget_id, | |
| 130 gfx::PluginWindowHandle compositing_surface) { | |
| 131 } | |
| 132 | |
| 133 int MockRenderProcessHost::GetID() const { | 128 int MockRenderProcessHost::GetID() const { |
| 134 return id_; | 129 return id_; |
| 135 } | 130 } |
| 136 | 131 |
| 137 bool MockRenderProcessHost::HasConnection() const { | 132 bool MockRenderProcessHost::HasConnection() const { |
| 138 return true; | 133 return true; |
| 139 } | 134 } |
| 140 | 135 |
| 141 void MockRenderProcessHost::SetIgnoreInputEvents(bool ignore_input_events) { | 136 void MockRenderProcessHost::SetIgnoreInputEvents(bool ignore_input_events) { |
| 142 } | 137 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 237 |
| 243 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { | 238 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { |
| 244 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); | 239 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); |
| 245 it != processes_.end(); ++it) { | 240 it != processes_.end(); ++it) { |
| 246 if (*it == host) { | 241 if (*it == host) { |
| 247 processes_.weak_erase(it); | 242 processes_.weak_erase(it); |
| 248 break; | 243 break; |
| 249 } | 244 } |
| 250 } | 245 } |
| 251 } | 246 } |
| OLD | NEW |