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 "content/plugin/plugin_channel.h" | 5 #include "content/plugin/plugin_channel.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 FROM_HERE, modal_dialog_event_map_[render_view_id].event); | 72 FROM_HERE, modal_dialog_event_map_[render_view_id].event); |
73 modal_dialog_event_map_.erase(render_view_id); | 73 modal_dialog_event_map_.erase(render_view_id); |
74 } | 74 } |
75 | 75 |
76 bool Send(IPC::Message* message) { | 76 bool Send(IPC::Message* message) { |
77 // Need this function for the IPC_MESSAGE_HANDLER_DELAY_REPLY macro. | 77 // Need this function for the IPC_MESSAGE_HANDLER_DELAY_REPLY macro. |
78 return sender_->Send(message); | 78 return sender_->Send(message); |
79 } | 79 } |
80 | 80 |
81 // IPC::MessageFilter: | 81 // IPC::MessageFilter: |
82 virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE { | 82 virtual void OnFilterAdded(IPC::Sender* sender) override { |
83 sender_ = sender; | 83 sender_ = sender; |
84 } | 84 } |
85 | 85 |
86 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { | 86 virtual bool OnMessageReceived(const IPC::Message& message) override { |
87 IPC_BEGIN_MESSAGE_MAP(PluginChannel::MessageFilter, message) | 87 IPC_BEGIN_MESSAGE_MAP(PluginChannel::MessageFilter, message) |
88 IPC_MESSAGE_HANDLER_DELAY_REPLY(PluginMsg_Init, OnInit) | 88 IPC_MESSAGE_HANDLER_DELAY_REPLY(PluginMsg_Init, OnInit) |
89 IPC_MESSAGE_HANDLER(PluginMsg_SignalModalDialogEvent, | 89 IPC_MESSAGE_HANDLER(PluginMsg_SignalModalDialogEvent, |
90 OnSignalModalDialogEvent) | 90 OnSignalModalDialogEvent) |
91 IPC_MESSAGE_HANDLER(PluginMsg_ResetModalDialogEvent, | 91 IPC_MESSAGE_HANDLER(PluginMsg_ResetModalDialogEvent, |
92 OnResetModalDialogEvent) | 92 OnResetModalDialogEvent) |
93 IPC_END_MESSAGE_MAP() | 93 IPC_END_MESSAGE_MAP() |
94 return message.type() == PluginMsg_SignalModalDialogEvent::ID || | 94 return message.type() == PluginMsg_SignalModalDialogEvent::ID || |
95 message.type() == PluginMsg_ResetModalDialogEvent::ID; | 95 message.type() == PluginMsg_ResetModalDialogEvent::ID; |
96 } | 96 } |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 void PluginChannel::OnDidAbortLoading(int render_view_id) { | 339 void PluginChannel::OnDidAbortLoading(int render_view_id) { |
340 for (size_t i = 0; i < plugin_stubs_.size(); ++i) { | 340 for (size_t i = 0; i < plugin_stubs_.size(); ++i) { |
341 if (plugin_stubs_[i]->webplugin()->host_render_view_routing_id() == | 341 if (plugin_stubs_[i]->webplugin()->host_render_view_routing_id() == |
342 render_view_id) { | 342 render_view_id) { |
343 plugin_stubs_[i]->delegate()->instance()->CloseStreams(); | 343 plugin_stubs_[i]->delegate()->instance()->CloseStreams(); |
344 } | 344 } |
345 } | 345 } |
346 } | 346 } |
347 | 347 |
348 } // namespace content | 348 } // namespace content |
OLD | NEW |