| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/pepper/pepper_browser_connection.h" | 5 #include "content/renderer/pepper/pepper_browser_connection.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 IPC_MESSAGE_UNHANDLED(handled = false) | 35 IPC_MESSAGE_UNHANDLED(handled = false) |
| 36 IPC_END_MESSAGE_MAP() | 36 IPC_END_MESSAGE_MAP() |
| 37 return handled; | 37 return handled; |
| 38 } | 38 } |
| 39 | 39 |
| 40 void PepperBrowserConnection::DidCreateInProcessInstance( | 40 void PepperBrowserConnection::DidCreateInProcessInstance( |
| 41 PP_Instance instance, | 41 PP_Instance instance, |
| 42 int render_frame_id, | 42 int render_frame_id, |
| 43 const GURL& document_url, | 43 const GURL& document_url, |
| 44 const GURL& plugin_url) { | 44 const GURL& plugin_url) { |
| 45 // We don't need to know if it's a privileged context for in-process plugins. |
| 46 bool is_privileged_context = false; |
| 45 Send(new ViewHostMsg_DidCreateInProcessInstance( | 47 Send(new ViewHostMsg_DidCreateInProcessInstance( |
| 46 instance, | 48 instance, |
| 47 // Browser provides the render process id. | 49 // Browser provides the render process id. |
| 48 PepperRendererInstanceData( | 50 PepperRendererInstanceData(0, render_frame_id, document_url, plugin_url, |
| 49 0, render_frame_id, document_url, plugin_url))); | 51 is_privileged_context))); |
| 50 } | 52 } |
| 51 | 53 |
| 52 void PepperBrowserConnection::DidDeleteInProcessInstance(PP_Instance instance) { | 54 void PepperBrowserConnection::DidDeleteInProcessInstance(PP_Instance instance) { |
| 53 Send(new ViewHostMsg_DidDeleteInProcessInstance(instance)); | 55 Send(new ViewHostMsg_DidDeleteInProcessInstance(instance)); |
| 54 } | 56 } |
| 55 | 57 |
| 56 void PepperBrowserConnection::SendBrowserCreate( | 58 void PepperBrowserConnection::SendBrowserCreate( |
| 57 int child_process_id, | 59 int child_process_id, |
| 58 PP_Instance instance, | 60 PP_Instance instance, |
| 59 const std::vector<IPC::Message>& nested_msgs, | 61 const std::vector<IPC::Message>& nested_msgs, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 86 // manually check. | 88 // manually check. |
| 87 int32_t ret = next_sequence_number_; | 89 int32_t ret = next_sequence_number_; |
| 88 if (next_sequence_number_ == std::numeric_limits<int32_t>::max()) | 90 if (next_sequence_number_ == std::numeric_limits<int32_t>::max()) |
| 89 next_sequence_number_ = 1; // Skip 0 which is invalid. | 91 next_sequence_number_ = 1; // Skip 0 which is invalid. |
| 90 else | 92 else |
| 91 next_sequence_number_++; | 93 next_sequence_number_++; |
| 92 return ret; | 94 return ret; |
| 93 } | 95 } |
| 94 | 96 |
| 95 } // namespace content | 97 } // namespace content |
| OLD | NEW |