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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10830072: Browser Plugin: New Implementation (Renderer Side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed according to comments by creis@. Moved postMessage stuff out for another cl 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/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "content/public/common/content_constants.h" 48 #include "content/public/common/content_constants.h"
49 #include "content/public/common/content_switches.h" 49 #include "content/public/common/content_switches.h"
50 #include "content/public/common/context_menu_params.h" 50 #include "content/public/common/context_menu_params.h"
51 #include "content/public/common/file_chooser_params.h" 51 #include "content/public/common/file_chooser_params.h"
52 #include "content/public/common/url_constants.h" 52 #include "content/public/common/url_constants.h"
53 #include "content/public/renderer/content_renderer_client.h" 53 #include "content/public/renderer/content_renderer_client.h"
54 #include "content/public/renderer/document_state.h" 54 #include "content/public/renderer/document_state.h"
55 #include "content/public/renderer/navigation_state.h" 55 #include "content/public/renderer/navigation_state.h"
56 #include "content/public/renderer/render_view_observer.h" 56 #include "content/public/renderer/render_view_observer.h"
57 #include "content/public/renderer/render_view_visitor.h" 57 #include "content/public/renderer/render_view_visitor.h"
58 #include "content/renderer/browser_plugin/browser_plugin.h"
59 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
58 #include "content/renderer/browser_plugin/old/browser_plugin.h" 60 #include "content/renderer/browser_plugin/old/browser_plugin.h"
59 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h" 61 #include "content/renderer/browser_plugin/old/browser_plugin_channel_manager.h"
60 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h" 62 #include "content/renderer/browser_plugin/old/browser_plugin_constants.h"
61 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h" 63 #include "content/renderer/browser_plugin/old/guest_to_embedder_channel.h"
62 #include "content/renderer/device_orientation_dispatcher.h" 64 #include "content/renderer/device_orientation_dispatcher.h"
63 #include "content/renderer/devtools_agent.h" 65 #include "content/renderer/devtools_agent.h"
64 #include "content/renderer/dom_automation_controller.h" 66 #include "content/renderer/dom_automation_controller.h"
65 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 67 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
66 #include "content/renderer/external_popup_menu.h" 68 #include "content/renderer/external_popup_menu.h"
67 #include "content/renderer/geolocation_dispatcher.h" 69 #include "content/renderer/geolocation_dispatcher.h"
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 // WebKit::WebFrameClient ----------------------------------------------------- 2299 // WebKit::WebFrameClient -----------------------------------------------------
2298 2300
2299 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, 2301 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame,
2300 const WebPluginParams& params) { 2302 const WebPluginParams& params) {
2301 WebPlugin* plugin = NULL; 2303 WebPlugin* plugin = NULL;
2302 if (content::GetContentClient()->renderer()->OverrideCreatePlugin( 2304 if (content::GetContentClient()->renderer()->OverrideCreatePlugin(
2303 this, frame, params, &plugin)) { 2305 this, frame, params, &plugin)) {
2304 return plugin; 2306 return plugin;
2305 } 2307 }
2306 2308
2309 // TODO(fsamuel): Remove this once upstreaming of the new browser plugin is
2310 // complete.
2311 if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginNewMimeType) {
2312 return content::browser_plugin::BrowserPluginManager::Get()->
2313 CreateBrowserPlugin(this, frame, params);
Charlie Reis 2012/08/03 20:01:00 nit: Looks like the indent is wrong on these two l
Fady Samuel 2012/08/03 22:04:13 Done.
2314 }
2315
2307 if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType) 2316 if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType)
2308 return BrowserPlugin::Create(this, frame, params); 2317 return BrowserPlugin::Create(this, frame, params);
2309 2318
2310 webkit::WebPluginInfo info; 2319 webkit::WebPluginInfo info;
2311 std::string mime_type; 2320 std::string mime_type;
2312 bool found = GetPluginInfo(params.url, frame->top()->document().url(), 2321 bool found = GetPluginInfo(params.url, frame->top()->document().url(),
2313 params.mimeType.utf8(), &info, &mime_type); 2322 params.mimeType.utf8(), &info, &mime_type);
2314 if (!found) 2323 if (!found)
2315 return NULL; 2324 return NULL;
2316 2325
(...skipping 3419 matching lines...) Expand 10 before | Expand all | Expand 10 after
5736 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5745 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5737 return !!RenderThreadImpl::current()->compositor_thread(); 5746 return !!RenderThreadImpl::current()->compositor_thread();
5738 } 5747 }
5739 5748
5740 void RenderViewImpl::OnJavaBridgeInit() { 5749 void RenderViewImpl::OnJavaBridgeInit() {
5741 DCHECK(!java_bridge_dispatcher_); 5750 DCHECK(!java_bridge_dispatcher_);
5742 #if defined(ENABLE_JAVA_BRIDGE) 5751 #if defined(ENABLE_JAVA_BRIDGE)
5743 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5752 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5744 #endif 5753 #endif
5745 } 5754 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698