| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #if defined(ENABLE_PEPPER) | 5 #if defined(ENABLE_PEPPER) |
| 6 #define PEPPER_APIS_ENABLED | 6 #define PEPPER_APIS_ENABLED |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #include "chrome/renderer/render_view.h" | 9 #include "chrome/renderer/render_view.h" |
| 10 | 10 |
| (...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1798 WebFrame* frame, const WebPluginParams& params) { | 1798 WebFrame* frame, const WebPluginParams& params) { |
| 1799 return new webkit_glue::WebPluginImpl(frame, params, AsWeakPtr()); | 1799 return new webkit_glue::WebPluginImpl(frame, params, AsWeakPtr()); |
| 1800 } | 1800 } |
| 1801 | 1801 |
| 1802 WebWorker* RenderView::createWorker(WebFrame* frame, WebWorkerClient* client) { | 1802 WebWorker* RenderView::createWorker(WebFrame* frame, WebWorkerClient* client) { |
| 1803 return new WebWorkerProxy(client, RenderThread::current(), routing_id_); | 1803 return new WebWorkerProxy(client, RenderThread::current(), routing_id_); |
| 1804 } | 1804 } |
| 1805 | 1805 |
| 1806 WebSharedWorker* RenderView::createSharedWorker( | 1806 WebSharedWorker* RenderView::createSharedWorker( |
| 1807 WebFrame* frame, const WebURL& url, const WebString& name, | 1807 WebFrame* frame, const WebURL& url, const WebString& name, |
| 1808 unsigned long long documentId) { | 1808 unsigned long long document_id) { |
| 1809 | 1809 |
| 1810 // TODO(atwilson): Call to the browser process to check if there's an existing | 1810 int route_id = MSG_ROUTING_NONE; |
| 1811 // worker (passing MSG_ROUTING_NONE for now, to indicate no existing worker). | 1811 bool url_mismatch = false; |
| 1812 int worker_route_id = MSG_ROUTING_NONE; | 1812 Send(new ViewHostMsg_LookupSharedWorker( |
| 1813 return new WebSharedWorkerProxy( | 1813 url, name, document_id, &route_id, &url_mismatch)); |
| 1814 RenderThread::current(), worker_route_id, routing_id_); | 1814 if (url_mismatch) { |
| 1815 return NULL; |
| 1816 } else { |
| 1817 return new WebSharedWorkerProxy(RenderThread::current(), |
| 1818 route_id, |
| 1819 routing_id_); |
| 1820 } |
| 1815 } | 1821 } |
| 1816 | 1822 |
| 1817 WebMediaPlayer* RenderView::createMediaPlayer( | 1823 WebMediaPlayer* RenderView::createMediaPlayer( |
| 1818 WebFrame* frame, WebMediaPlayerClient* client) { | 1824 WebFrame* frame, WebMediaPlayerClient* client) { |
| 1819 scoped_refptr<media::FilterFactoryCollection> factory = | 1825 scoped_refptr<media::FilterFactoryCollection> factory = |
| 1820 new media::FilterFactoryCollection(); | 1826 new media::FilterFactoryCollection(); |
| 1821 // Add in any custom filter factories first. | 1827 // Add in any custom filter factories first. |
| 1822 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 1828 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 1823 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 1829 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
| 1824 // Add the chrome specific audio renderer. | 1830 // Add the chrome specific audio renderer. |
| (...skipping 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3825 new PluginMsg_SignalModalDialogEvent(host_window_)); | 3831 new PluginMsg_SignalModalDialogEvent(host_window_)); |
| 3826 | 3832 |
| 3827 message->EnableMessagePumping(); // Runs a nested message loop. | 3833 message->EnableMessagePumping(); // Runs a nested message loop. |
| 3828 bool rv = Send(message); | 3834 bool rv = Send(message); |
| 3829 | 3835 |
| 3830 PluginChannelHost::Broadcast( | 3836 PluginChannelHost::Broadcast( |
| 3831 new PluginMsg_ResetModalDialogEvent(host_window_)); | 3837 new PluginMsg_ResetModalDialogEvent(host_window_)); |
| 3832 | 3838 |
| 3833 return rv; | 3839 return rv; |
| 3834 } | 3840 } |
| OLD | NEW |