OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 #include "content/renderer/render_widget_fullscreen_pepper.h" | 67 #include "content/renderer/render_widget_fullscreen_pepper.h" |
68 #include "content/renderer/renderer_accessibility.h" | 68 #include "content/renderer/renderer_accessibility.h" |
69 #include "content/renderer/renderer_webapplicationcachehost_impl.h" | 69 #include "content/renderer/renderer_webapplicationcachehost_impl.h" |
70 #include "content/renderer/renderer_webstoragenamespace_impl.h" | 70 #include "content/renderer/renderer_webstoragenamespace_impl.h" |
71 #include "content/renderer/speech_input_dispatcher.h" | 71 #include "content/renderer/speech_input_dispatcher.h" |
72 #include "content/renderer/text_input_client_observer.h" | 72 #include "content/renderer/text_input_client_observer.h" |
73 #include "content/renderer/v8_value_converter_impl.h" | 73 #include "content/renderer/v8_value_converter_impl.h" |
74 #include "content/renderer/web_ui_bindings.h" | 74 #include "content/renderer/web_ui_bindings.h" |
75 #include "content/renderer/webplugin_delegate_proxy.h" | 75 #include "content/renderer/webplugin_delegate_proxy.h" |
76 #include "content/renderer/websharedworker_proxy.h" | 76 #include "content/renderer/websharedworker_proxy.h" |
77 #include "content/renderer/webworker_proxy.h" | |
78 #include "media/base/filter_collection.h" | 77 #include "media/base/filter_collection.h" |
79 #include "media/base/media_switches.h" | 78 #include "media/base/media_switches.h" |
80 #include "media/base/message_loop_factory_impl.h" | 79 #include "media/base/message_loop_factory_impl.h" |
81 #include "net/base/escape.h" | 80 #include "net/base/escape.h" |
82 #include "net/base/net_errors.h" | 81 #include "net/base/net_errors.h" |
83 #include "net/http/http_util.h" | 82 #include "net/http/http_util.h" |
84 #include "ppapi/c/private/ppb_flash_net_connector.h" | 83 #include "ppapi/c/private/ppb_flash_net_connector.h" |
85 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" | 84 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" |
86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" | 85 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" |
87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" | 86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" |
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1877 bool found = GetPluginInfo(params.url, frame->top()->document().url(), | 1876 bool found = GetPluginInfo(params.url, frame->top()->document().url(), |
1878 params.mimeType.utf8(), &info, &mime_type); | 1877 params.mimeType.utf8(), &info, &mime_type); |
1879 if (!found) | 1878 if (!found) |
1880 return NULL; | 1879 return NULL; |
1881 | 1880 |
1882 WebPluginParams params_to_use = params; | 1881 WebPluginParams params_to_use = params; |
1883 params_to_use.mimeType = WebString::fromUTF8(mime_type); | 1882 params_to_use.mimeType = WebString::fromUTF8(mime_type); |
1884 return CreatePlugin(frame, info, params_to_use); | 1883 return CreatePlugin(frame, info, params_to_use); |
1885 } | 1884 } |
1886 | 1885 |
1887 WebWorker* RenderViewImpl::createWorker(WebFrame* frame, | |
1888 WebWorkerClient* client) { | |
1889 WebApplicationCacheHostImpl* appcache_host = | |
1890 WebApplicationCacheHostImpl::FromFrame(frame); | |
1891 int appcache_host_id = appcache_host ? appcache_host->host_id() : 0; | |
1892 return new WebWorkerProxy(client, RenderThreadImpl::current(), routing_id_, | |
1893 appcache_host_id); | |
1894 } | |
1895 | |
1896 WebSharedWorker* RenderViewImpl::createSharedWorker( | 1886 WebSharedWorker* RenderViewImpl::createSharedWorker( |
1897 WebFrame* frame, const WebURL& url, const WebString& name, | 1887 WebFrame* frame, const WebURL& url, const WebString& name, |
1898 unsigned long long document_id) { | 1888 unsigned long long document_id) { |
1899 | 1889 |
1900 int route_id = MSG_ROUTING_NONE; | 1890 int route_id = MSG_ROUTING_NONE; |
1901 bool exists = false; | 1891 bool exists = false; |
1902 bool url_mismatch = false; | 1892 bool url_mismatch = false; |
1903 ViewHostMsg_CreateWorker_Params params; | 1893 ViewHostMsg_CreateWorker_Params params; |
1904 params.url = url; | 1894 params.url = url; |
1905 params.is_shared = true; | |
1906 params.name = name; | 1895 params.name = name; |
1907 params.document_id = document_id; | 1896 params.document_id = document_id; |
1908 params.render_view_route_id = routing_id_; | 1897 params.render_view_route_id = routing_id_; |
1909 params.route_id = MSG_ROUTING_NONE; | 1898 params.route_id = MSG_ROUTING_NONE; |
1910 params.parent_appcache_host_id = 0; | |
1911 params.script_resource_appcache_id = 0; | 1899 params.script_resource_appcache_id = 0; |
1912 Send(new ViewHostMsg_LookupSharedWorker( | 1900 Send(new ViewHostMsg_LookupSharedWorker( |
1913 params, &exists, &route_id, &url_mismatch)); | 1901 params, &exists, &route_id, &url_mismatch)); |
1914 if (url_mismatch) { | 1902 if (url_mismatch) { |
1915 return NULL; | 1903 return NULL; |
1916 } else { | 1904 } else { |
1917 return new WebSharedWorkerProxy(RenderThreadImpl::current(), | 1905 return new WebSharedWorkerProxy(RenderThreadImpl::current(), |
1918 document_id, | 1906 document_id, |
1919 exists, | 1907 exists, |
1920 route_id, | 1908 route_id, |
(...skipping 2746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4667 return webview()->settings()->useThreadedCompositor(); | 4655 return webview()->settings()->useThreadedCompositor(); |
4668 } | 4656 } |
4669 | 4657 |
4670 void RenderViewImpl::OnJavaBridgeInit( | 4658 void RenderViewImpl::OnJavaBridgeInit( |
4671 const IPC::ChannelHandle& channel_handle) { | 4659 const IPC::ChannelHandle& channel_handle) { |
4672 DCHECK(!java_bridge_dispatcher_.get()); | 4660 DCHECK(!java_bridge_dispatcher_.get()); |
4673 #if defined(ENABLE_JAVA_BRIDGE) | 4661 #if defined(ENABLE_JAVA_BRIDGE) |
4674 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); | 4662 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); |
4675 #endif | 4663 #endif |
4676 } | 4664 } |
OLD | NEW |