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/renderer/browser_plugin/browser_plugin_manager_impl.h" | 5 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" |
6 | 6 |
7 #include "content/common/browser_plugin/browser_plugin_constants.h" | 7 #include "content/common/browser_plugin/browser_plugin_constants.h" |
8 #include "content/common/browser_plugin/browser_plugin_messages.h" | 8 #include "content/common/browser_plugin/browser_plugin_messages.h" |
9 #include "content/common/cursors/webcursor.h" | 9 #include "content/common/cursors/webcursor.h" |
10 #include "content/renderer/browser_plugin/browser_plugin.h" | 10 #include "content/renderer/browser_plugin/browser_plugin.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 void BrowserPluginManagerImpl::DidCommitCompositorFrame() { | 68 void BrowserPluginManagerImpl::DidCommitCompositorFrame() { |
69 IDMap<BrowserPlugin>::iterator iter(&instances_); | 69 IDMap<BrowserPlugin>::iterator iter(&instances_); |
70 while (!iter.IsAtEnd()) { | 70 while (!iter.IsAtEnd()) { |
71 iter.GetCurrentValue()->DidCommitCompositorFrame(); | 71 iter.GetCurrentValue()->DidCommitCompositorFrame(); |
72 iter.Advance(); | 72 iter.Advance(); |
73 } | 73 } |
74 } | 74 } |
75 | 75 |
76 void BrowserPluginManagerImpl::OnAllocateInstanceIDACK( | 76 void BrowserPluginManagerImpl::OnAllocateInstanceIDACK( |
77 const IPC::Message& message, | |
78 int request_id, | 77 int request_id, |
79 int guest_instance_id) { | 78 int guest_instance_id) { |
80 InstanceIDMap::iterator it = | 79 InstanceIDMap::iterator it = |
81 pending_allocate_guest_instance_id_requests_.find(request_id); | 80 pending_allocate_guest_instance_id_requests_.find(request_id); |
82 if (it == pending_allocate_guest_instance_id_requests_.end()) | 81 if (it == pending_allocate_guest_instance_id_requests_.end()) |
83 return; | 82 return; |
84 | 83 |
85 const base::WeakPtr<BrowserPlugin> plugin(it->second); | 84 const base::WeakPtr<BrowserPlugin> plugin(it->second); |
86 if (!plugin) | 85 if (!plugin) |
87 return; | 86 return; |
88 pending_allocate_guest_instance_id_requests_.erase(request_id); | 87 pending_allocate_guest_instance_id_requests_.erase(request_id); |
89 plugin->OnInstanceIDAllocated(guest_instance_id); | 88 plugin->OnInstanceIDAllocated(guest_instance_id); |
90 } | 89 } |
91 | 90 |
92 } // namespace content | 91 } // namespace content |
OLD | NEW |