Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(793)

Side by Side Diff: content/renderer/browser_plugin/browser_plugin_manager_impl.cc

Issue 283623002: Add support for passing an arbitrary parameter to an IPC message handler. The motivation is for Web… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_manager_impl.h ('k') | content/renderer/input/input_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698