| 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_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 message = l10n_util::GetStringUTF16( | 61 message = l10n_util::GetStringUTF16( |
| 62 IDS_GTALK_REMOTING_CONTINUE_DIALOG_MESSAGE); | 62 IDS_GTALK_REMOTING_CONTINUE_DIALOG_MESSAGE); |
| 63 break; | 63 break; |
| 64 default: | 64 default: |
| 65 NOTREACHED(); | 65 NOTREACHED(); |
| 66 return reply; | 66 return reply; |
| 67 } | 67 } |
| 68 | 68 |
| 69 // TODO(brettw). We should not be grabbing the active toplevel window, we | 69 // TODO(brettw). We should not be grabbing the active toplevel window, we |
| 70 // should use the toplevel window associated with the render view. | 70 // should use the toplevel window associated with the render view. |
| 71 aura::Window* parent = ash::Shell::GetContainer( | 71 aura::Window* parent = |
| 72 ash::Shell::GetTargetRootWindow(), | 72 ash::Shell::GetContainer(ash::Shell::GetTargetRootWindow(), |
| 73 ash::internal::kShellWindowId_SystemModalContainer); | 73 ash::kShellWindowId_SystemModalContainer); |
| 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 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 } | 244 } |
| 245 | 245 |
| 246 void PepperTalkHost::OnStopRemotingCompleted( | 246 void PepperTalkHost::OnStopRemotingCompleted( |
| 247 ppapi::host::ReplyMessageContext reply) { | 247 ppapi::host::ReplyMessageContext reply) { |
| 248 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 248 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| 249 remoting_started_ = false; | 249 remoting_started_ = false; |
| 250 host()->SendReply(reply, PpapiPluginMsg_Talk_StopRemotingReply()); | 250 host()->SendReply(reply, PpapiPluginMsg_Talk_StopRemotingReply()); |
| 251 } | 251 } |
| 252 | 252 |
| 253 } // namespace chrome | 253 } // namespace chrome |
| OLD | NEW |