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 12 matching lines...) Expand all Loading... | |
23 | 23 |
24 PepperBrowserConnection::~PepperBrowserConnection() {} | 24 PepperBrowserConnection::~PepperBrowserConnection() {} |
25 | 25 |
26 bool PepperBrowserConnection::OnMessageReceived(const IPC::Message& msg) { | 26 bool PepperBrowserConnection::OnMessageReceived(const IPC::Message& msg) { |
27 // Check if the message is an in-process reply. | 27 // Check if the message is an in-process reply. |
28 if (PepperInProcessRouter::OnPluginMsgReceived(msg)) | 28 if (PepperInProcessRouter::OnPluginMsgReceived(msg)) |
29 return true; | 29 return true; |
30 | 30 |
31 bool handled = true; | 31 bool handled = true; |
32 IPC_BEGIN_MESSAGE_MAP(PepperBrowserConnection, msg) | 32 IPC_BEGIN_MESSAGE_MAP(PepperBrowserConnection, msg) |
33 IPC_MESSAGE_HANDLER(PpapiHostMsg_CreateResourceHostsFromHostReply, | 33 IPC_MESSAGE_HANDLER(PpapiHostMsg_CreateResourceHostsFromHostReply, |
Tom Sepez
2014/05/13 20:03:47
ditto
| |
34 OnMsgCreateResourceHostsFromHostReply) | 34 OnMsgCreateResourceHostsFromHostReply) |
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 Send(new ViewHostMsg_DidCreateInProcessInstance( | 45 Send(new ViewHostMsg_DidCreateInProcessInstance( |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 // manually check. | 86 // manually check. |
87 int32_t ret = next_sequence_number_; | 87 int32_t ret = next_sequence_number_; |
88 if (next_sequence_number_ == std::numeric_limits<int32_t>::max()) | 88 if (next_sequence_number_ == std::numeric_limits<int32_t>::max()) |
89 next_sequence_number_ = 1; // Skip 0 which is invalid. | 89 next_sequence_number_ = 1; // Skip 0 which is invalid. |
90 else | 90 else |
91 next_sequence_number_++; | 91 next_sequence_number_++; |
92 return ret; | 92 return ret; |
93 } | 93 } |
94 | 94 |
95 } // namespace content | 95 } // namespace content |
OLD | NEW |