| OLD | NEW |
| 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 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "base/strings/string_split.h" | 28 #include "base/strings/string_split.h" |
| 29 #include "base/strings/string_util.h" | 29 #include "base/strings/string_util.h" |
| 30 #include "base/strings/sys_string_conversions.h" | 30 #include "base/strings/sys_string_conversions.h" |
| 31 #include "base/strings/utf_string_conversions.h" | 31 #include "base/strings/utf_string_conversions.h" |
| 32 #include "base/time/time.h" | 32 #include "base/time/time.h" |
| 33 #include "content/child/appcache/appcache_dispatcher.h" | 33 #include "content/child/appcache/appcache_dispatcher.h" |
| 34 #include "content/child/appcache/web_application_cache_host_impl.h" | 34 #include "content/child/appcache/web_application_cache_host_impl.h" |
| 35 #include "content/child/child_thread.h" | 35 #include "content/child/child_thread.h" |
| 36 #include "content/child/npapi/webplugin_delegate_impl.h" | 36 #include "content/child/npapi/webplugin_delegate_impl.h" |
| 37 #include "content/child/request_extra_data.h" | 37 #include "content/child/request_extra_data.h" |
| 38 #include "content/child/service_worker/web_service_worker_registry_proxy.h" |
| 38 #include "content/child/webmessageportchannel_impl.h" | 39 #include "content/child/webmessageportchannel_impl.h" |
| 39 #include "content/common/clipboard_messages.h" | 40 #include "content/common/clipboard_messages.h" |
| 40 #include "content/common/database_messages.h" | 41 #include "content/common/database_messages.h" |
| 41 #include "content/common/dom_storage/dom_storage_types.h" | 42 #include "content/common/dom_storage/dom_storage_types.h" |
| 42 #include "content/common/drag_messages.h" | 43 #include "content/common/drag_messages.h" |
| 43 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 44 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 44 #include "content/common/input_messages.h" | 45 #include "content/common/input_messages.h" |
| 45 #include "content/common/java_bridge_messages.h" | 46 #include "content/common/java_bridge_messages.h" |
| 46 #include "content/common/pepper_messages.h" | 47 #include "content/common/pepper_messages.h" |
| 47 #include "content/common/socket_stream_handle_data.h" | 48 #include "content/common/socket_stream_handle_data.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 using WebKit::WebHistoryItem; | 283 using WebKit::WebHistoryItem; |
| 283 using WebKit::WebHTTPBody; | 284 using WebKit::WebHTTPBody; |
| 284 using WebKit::WebIconURL; | 285 using WebKit::WebIconURL; |
| 285 using WebKit::WebImage; | 286 using WebKit::WebImage; |
| 286 using WebKit::WebInputElement; | 287 using WebKit::WebInputElement; |
| 287 using WebKit::WebInputEvent; | 288 using WebKit::WebInputEvent; |
| 288 using WebKit::WebMediaPlayer; | 289 using WebKit::WebMediaPlayer; |
| 289 using WebKit::WebMediaPlayerAction; | 290 using WebKit::WebMediaPlayerAction; |
| 290 using WebKit::WebMediaPlayerClient; | 291 using WebKit::WebMediaPlayerClient; |
| 291 using WebKit::WebMouseEvent; | 292 using WebKit::WebMouseEvent; |
| 293 using WebKit::WebServiceWorkerRegistry; |
| 292 using WebKit::WebNavigationPolicy; | 294 using WebKit::WebNavigationPolicy; |
| 293 using WebKit::WebNavigationType; | 295 using WebKit::WebNavigationType; |
| 294 using WebKit::WebNode; | 296 using WebKit::WebNode; |
| 295 using WebKit::WebPageSerializer; | 297 using WebKit::WebPageSerializer; |
| 296 using WebKit::WebPageSerializerClient; | 298 using WebKit::WebPageSerializerClient; |
| 297 using WebKit::WebPeerConnection00Handler; | 299 using WebKit::WebPeerConnection00Handler; |
| 298 using WebKit::WebPeerConnection00HandlerClient; | 300 using WebKit::WebPeerConnection00HandlerClient; |
| 299 using WebKit::WebPeerConnectionHandler; | 301 using WebKit::WebPeerConnectionHandler; |
| 300 using WebKit::WebPeerConnectionHandlerClient; | 302 using WebKit::WebPeerConnectionHandlerClient; |
| 301 using WebKit::WebPluginAction; | 303 using WebKit::WebPluginAction; |
| (...skipping 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3070 sink, | 3072 sink, |
| 3071 gpu_factories, | 3073 gpu_factories, |
| 3072 new RenderMediaLog()); | 3074 new RenderMediaLog()); |
| 3073 return new WebMediaPlayerImpl(frame, client, AsWeakPtr(), params); | 3075 return new WebMediaPlayerImpl(frame, client, AsWeakPtr(), params); |
| 3074 } | 3076 } |
| 3075 | 3077 |
| 3076 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { | 3078 WebCookieJar* RenderViewImpl::cookieJar(WebFrame* frame) { |
| 3077 return &cookie_jar_; | 3079 return &cookie_jar_; |
| 3078 } | 3080 } |
| 3079 | 3081 |
| 3082 WebServiceWorkerRegistry* RenderViewImpl::serviceWorkerRegistry( |
| 3083 WebFrame* frame) { |
| 3084 // need to pass some context like the current origin? |
| 3085 return new WebServiceWorkerRegistryImpl(); |
| 3086 } |
| 3087 |
| 3080 void RenderViewImpl::didAccessInitialDocument(WebFrame* frame) { | 3088 void RenderViewImpl::didAccessInitialDocument(WebFrame* frame) { |
| 3081 // Notify the browser process that it is no longer safe to show the pending | 3089 // Notify the browser process that it is no longer safe to show the pending |
| 3082 // URL of the main frame, since a URL spoof is now possible. | 3090 // URL of the main frame, since a URL spoof is now possible. |
| 3083 if (!frame->parent() && page_id_ == -1) | 3091 if (!frame->parent() && page_id_ == -1) |
| 3084 Send(new ViewHostMsg_DidAccessInitialDocument(routing_id_)); | 3092 Send(new ViewHostMsg_DidAccessInitialDocument(routing_id_)); |
| 3085 } | 3093 } |
| 3086 | 3094 |
| 3087 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { | 3095 void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { |
| 3088 // We only need to notify the browser if the active, top-level frame clears | 3096 // We only need to notify the browser if the active, top-level frame clears |
| 3089 // its opener. We can ignore cases where a swapped out frame clears its | 3097 // its opener. We can ignore cases where a swapped out frame clears its |
| (...skipping 3415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6505 for (size_t i = 0; i < icon_urls.size(); i++) { | 6513 for (size_t i = 0; i < icon_urls.size(); i++) { |
| 6506 WebURL url = icon_urls[i].iconURL(); | 6514 WebURL url = icon_urls[i].iconURL(); |
| 6507 if (!url.isEmpty()) | 6515 if (!url.isEmpty()) |
| 6508 urls.push_back(FaviconURL(url, | 6516 urls.push_back(FaviconURL(url, |
| 6509 ToFaviconType(icon_urls[i].iconType()))); | 6517 ToFaviconType(icon_urls[i].iconType()))); |
| 6510 } | 6518 } |
| 6511 SendUpdateFaviconURL(urls); | 6519 SendUpdateFaviconURL(urls); |
| 6512 } | 6520 } |
| 6513 | 6521 |
| 6514 } // namespace content | 6522 } // namespace content |
| OLD | NEW |