summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppapi_command_buffer_proxy.cc
diff options
context:
space:
mode:
authorfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 23:47:27 +0000
committerfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 23:47:27 +0000
commit2651ef6e6abdc9f09dce34eb7b267d7613d790bc (patch)
tree84309a510ff0d1dd2139d8ad4dde69915c0527cb /ppapi/proxy/ppapi_command_buffer_proxy.cc
parentd6a86aa4e93d0b5000ffc3af600c619a759145dc (diff)
downloadchromium_src-2651ef6e6abdc9f09dce34eb7b267d7613d790bc.zip
chromium_src-2651ef6e6abdc9f09dce34eb7b267d7613d790bc.tar.gz
chromium_src-2651ef6e6abdc9f09dce34eb7b267d7613d790bc.tar.bz2
Updated PpapiCommandBufferProxy to take a ChannelError callback (same signature as CommandBufferProxy).
Added a ReportChannelError method to call the closure. This is used by the guest renderer to recover from a lost context. BUG=120664 TEST=manually Review URL: http://codereview.chromium.org/9844023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppapi_command_buffer_proxy.cc')
-rw-r--r--ppapi/proxy/ppapi_command_buffer_proxy.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.cc b/ppapi/proxy/ppapi_command_buffer_proxy.cc
index a457bc4..07f7aae 100644
--- a/ppapi/proxy/ppapi_command_buffer_proxy.cc
+++ b/ppapi/proxy/ppapi_command_buffer_proxy.cc
@@ -29,6 +29,18 @@ PpapiCommandBufferProxy::~PpapiCommandBufferProxy() {
}
}
+void PpapiCommandBufferProxy::SetChannelErrorCallback(
+ const base::Closure& callback) {
+ channel_error_callback_ = callback;
+}
+
+void PpapiCommandBufferProxy::ReportChannelError() {
+ if (!channel_error_callback_.is_null()) {
+ channel_error_callback_.Run();
+ channel_error_callback_.Reset();
+ }
+}
+
bool PpapiCommandBufferProxy::Initialize() {
return Send(new PpapiHostMsg_PPBGraphics3D_InitCommandBuffer(
ppapi::API_ID_PPB_GRAPHICS_3D, resource_));