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

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

Issue 1162053003: Move BrowserPluginDelegate's lifetime mgmt out of content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync @tott Created 5 years, 6 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
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.h" 5 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
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/frame_messages.h" 9 #include "content/common/frame_messages.h"
10 #include "content/public/renderer/browser_plugin_delegate.h" 10 #include "content/public/renderer/browser_plugin_delegate.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 void BrowserPluginManager::Detach(int browser_plugin_instance_id) { 63 void BrowserPluginManager::Detach(int browser_plugin_instance_id) {
64 BrowserPlugin* plugin = GetBrowserPlugin(browser_plugin_instance_id); 64 BrowserPlugin* plugin = GetBrowserPlugin(browser_plugin_instance_id);
65 if (plugin) 65 if (plugin)
66 plugin->Detach(); 66 plugin->Detach();
67 } 67 }
68 68
69 BrowserPlugin* BrowserPluginManager::CreateBrowserPlugin( 69 BrowserPlugin* BrowserPluginManager::CreateBrowserPlugin(
70 RenderFrame* render_frame, 70 RenderFrame* render_frame,
71 scoped_ptr<BrowserPluginDelegate> delegate) { 71 BrowserPluginDelegate* delegate) {
72 return new BrowserPlugin(render_frame, delegate.Pass()); 72 return new BrowserPlugin(render_frame, delegate);
73 } 73 }
74 74
75 void BrowserPluginManager::DidCommitCompositorFrame( 75 void BrowserPluginManager::DidCommitCompositorFrame(
76 int render_frame_routing_id) { 76 int render_frame_routing_id) {
77 IDMap<BrowserPlugin>::iterator iter(&instances_); 77 IDMap<BrowserPlugin>::iterator iter(&instances_);
78 while (!iter.IsAtEnd()) { 78 while (!iter.IsAtEnd()) {
79 if (iter.GetCurrentValue()->render_frame_routing_id() == 79 if (iter.GetCurrentValue()->render_frame_routing_id() ==
80 render_frame_routing_id) { 80 render_frame_routing_id) {
81 iter.GetCurrentValue()->DidCommitCompositorFrame(); 81 iter.GetCurrentValue()->DidCommitCompositorFrame();
82 } 82 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 FrameHostMsg_CompositorFrameSwappedACK_Params params; 122 FrameHostMsg_CompositorFrameSwappedACK_Params params;
123 params.producing_host_id = base::get<1>(param).producing_host_id; 123 params.producing_host_id = base::get<1>(param).producing_host_id;
124 params.producing_route_id = base::get<1>(param).producing_route_id; 124 params.producing_route_id = base::get<1>(param).producing_route_id;
125 params.output_surface_id = base::get<1>(param).output_surface_id; 125 params.output_surface_id = base::get<1>(param).output_surface_id;
126 Send(new BrowserPluginHostMsg_CompositorFrameSwappedACK( 126 Send(new BrowserPluginHostMsg_CompositorFrameSwappedACK(
127 base::get<0>(param), params)); 127 base::get<0>(param), params));
128 } 128 }
129 129
130 } // namespace content 130 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_manager.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698