| OLD | NEW |
| 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/browser/renderer_host/pepper/pepper_talk_host.h" | 5 #include "chrome/browser/renderer_host/pepper/pepper_talk_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/public/browser/browser_ppapi_host.h" | 8 #include "content/public/browser/browser_ppapi_host.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 reply.params.set_result(static_cast<int32_t>( | 74 reply.params.set_result(static_cast<int32_t>( |
| 75 chrome::ShowMessageBox(parent, title, message, | 75 chrome::ShowMessageBox(parent, title, message, |
| 76 chrome::MESSAGE_BOX_TYPE_QUESTION) == | 76 chrome::MESSAGE_BOX_TYPE_QUESTION) == |
| 77 chrome::MESSAGE_BOX_RESULT_YES)); | 77 chrome::MESSAGE_BOX_RESULT_YES)); |
| 78 #else | 78 #else |
| 79 NOTIMPLEMENTED(); | 79 NOTIMPLEMENTED(); |
| 80 #endif | 80 #endif |
| 81 return reply; | 81 return reply; |
| 82 } | 82 } |
| 83 | 83 |
| 84 #if defined(USE_ASH) && defined(OS_CHROMEOS) |
| 84 void OnTerminateRemotingEventOnUIThread(const base::Closure& stop_callback) { | 85 void OnTerminateRemotingEventOnUIThread(const base::Closure& stop_callback) { |
| 85 content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, | 86 content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, |
| 86 stop_callback); | 87 stop_callback); |
| 87 } | 88 } |
| 89 #endif // defined(USE_ASH) && defined(OS_CHROMEOS) |
| 88 | 90 |
| 89 ppapi::host::ReplyMessageContext StartRemotingOnUIThread( | 91 ppapi::host::ReplyMessageContext StartRemotingOnUIThread( |
| 90 const base::Closure& stop_callback, | 92 const base::Closure& stop_callback, |
| 91 int render_process_id, | 93 int render_process_id, |
| 92 int render_view_id, | 94 int render_view_id, |
| 93 ppapi::host::ReplyMessageContext reply) { | 95 ppapi::host::ReplyMessageContext reply) { |
| 94 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 96 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 95 content::RenderViewHost* render_view_host = | 97 content::RenderViewHost* render_view_host = |
| 96 content::RenderViewHost::FromID(render_process_id, render_view_id); | 98 content::RenderViewHost::FromID(render_process_id, render_view_id); |
| 97 if (!render_view_host) { | 99 if (!render_view_host) { |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } | 244 } |
| 243 | 245 |
| 244 void PepperTalkHost::OnStopRemotingCompleted( | 246 void PepperTalkHost::OnStopRemotingCompleted( |
| 245 ppapi::host::ReplyMessageContext reply) { | 247 ppapi::host::ReplyMessageContext reply) { |
| 246 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 248 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| 247 remoting_started_ = false; | 249 remoting_started_ = false; |
| 248 host()->SendReply(reply, PpapiPluginMsg_Talk_StopRemotingReply()); | 250 host()->SendReply(reply, PpapiPluginMsg_Talk_StopRemotingReply()); |
| 249 } | 251 } |
| 250 | 252 |
| 251 } // namespace chrome | 253 } // namespace chrome |
| OLD | NEW |