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

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

Issue 10829219: Browser Plugin: Move to old namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style fix. Created 8 years, 4 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/old/browser_plugin.h" 5 #include "content/renderer/browser_plugin/old/browser_plugin.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/id_map.h" 8 #include "base/id_map.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/process.h" 10 #include "base/process.h"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "base/string_piece.h" 12 #include "base/string_piece.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "content/common/old_browser_plugin_messages.h" 15 #include "content/common/old_browser_plugin_messages.h"
16 #include "content/public/common/url_constants.h" 16 #include "content/public/common/url_constants.h"
17 #include "content/renderer/render_view_impl.h" 17 #include "content/renderer/render_view_impl.h"
18 #include "ipc/ipc_channel_handle.h" 18 #include "ipc/ipc_channel_handle.h"
19 #include "ppapi/proxy/host_dispatcher.h" 19 #include "ppapi/proxy/host_dispatcher.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h"
23 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 23 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
24 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" 24 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
25 #include "webkit/plugins/webview_plugin.h" 25 #include "webkit/plugins/webview_plugin.h"
26 26
27 namespace content {
28 namespace old {
29
27 static int g_next_id = 0; 30 static int g_next_id = 0;
28 31
29 // The global list of all Browser Plugin Placeholders within a process. 32 // The global list of all Browser Plugin Placeholders within a process.
30 base::LazyInstance<IDMap<BrowserPlugin> >::Leaky 33 base::LazyInstance<IDMap<BrowserPlugin> >::Leaky
31 g_all_browser_plugins = LAZY_INSTANCE_INITIALIZER; 34 g_all_browser_plugins = LAZY_INSTANCE_INITIALIZER;
32 35
33 using WebKit::WebPlugin; 36 using WebKit::WebPlugin;
34 using WebKit::WebPluginContainer; 37 using WebKit::WebPluginContainer;
35 using webkit::WebViewPlugin; 38 using webkit::WebViewPlugin;
36 39
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // TODO(fsamuel): We should delay the swapping out of the current plugin 150 // TODO(fsamuel): We should delay the swapping out of the current plugin
148 // until after the guest's WebGraphicsContext3D has been initialized. That 151 // until after the guest's WebGraphicsContext3D has been initialized. That
149 // way, we immediately have something to render onto the screen. 152 // way, we immediately have something to render onto the screen.
150 container->setPlugin(new_plugin); 153 container->setPlugin(new_plugin);
151 container->invalidate(); 154 container->invalidate();
152 container->reportGeometry(); 155 container->reportGeometry();
153 if (plugin_) 156 if (plugin_)
154 plugin_->destroy(); 157 plugin_->destroy();
155 plugin_ = new_plugin; 158 plugin_ = new_plugin;
156 } 159 }
160
161 } // namespace old
162 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698