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 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 using WebKit::WebFileSystem; | 199 using WebKit::WebFileSystem; |
200 using WebKit::WebFileSystemCallbacks; | 200 using WebKit::WebFileSystemCallbacks; |
201 using WebKit::WebFindOptions; | 201 using WebKit::WebFindOptions; |
202 using WebKit::WebFormControlElement; | 202 using WebKit::WebFormControlElement; |
203 using WebKit::WebFormElement; | 203 using WebKit::WebFormElement; |
204 using WebKit::WebFrame; | 204 using WebKit::WebFrame; |
205 using WebKit::WebHistoryItem; | 205 using WebKit::WebHistoryItem; |
206 using WebKit::WebIconURL; | 206 using WebKit::WebIconURL; |
207 using WebKit::WebImage; | 207 using WebKit::WebImage; |
208 using WebKit::WebInputElement; | 208 using WebKit::WebInputElement; |
| 209 using WebKit::WebIntentRequest; |
| 210 using WebKit::WebIntentServiceInfo; |
209 using WebKit::WebMediaPlayer; | 211 using WebKit::WebMediaPlayer; |
210 using WebKit::WebMediaPlayerAction; | 212 using WebKit::WebMediaPlayerAction; |
211 using WebKit::WebMediaPlayerClient; | 213 using WebKit::WebMediaPlayerClient; |
212 using WebKit::WebNavigationPolicy; | 214 using WebKit::WebNavigationPolicy; |
213 using WebKit::WebNavigationType; | 215 using WebKit::WebNavigationType; |
214 using WebKit::WebNode; | 216 using WebKit::WebNode; |
215 using WebKit::WebPageSerializer; | 217 using WebKit::WebPageSerializer; |
216 using WebKit::WebPageSerializerClient; | 218 using WebKit::WebPageSerializerClient; |
217 using WebKit::WebPlugin; | 219 using WebKit::WebPlugin; |
218 using WebKit::WebPluginAction; | 220 using WebKit::WebPluginAction; |
(...skipping 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3152 callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); | 3154 callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); |
3153 return; | 3155 return; |
3154 } | 3156 } |
3155 ChildThread::current()->quota_dispatcher()->RequestStorageQuota( | 3157 ChildThread::current()->quota_dispatcher()->RequestStorageQuota( |
3156 routing_id(), GURL(origin.toString()), | 3158 routing_id(), GURL(origin.toString()), |
3157 static_cast<quota::StorageType>(type), requested_size, | 3159 static_cast<quota::StorageType>(type), requested_size, |
3158 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 3160 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
3159 } | 3161 } |
3160 | 3162 |
3161 void RenderViewImpl::registerIntentService( | 3163 void RenderViewImpl::registerIntentService( |
3162 WebKit::WebFrame* frame, const WebKit::WebIntentServiceInfo& service) { | 3164 WebFrame* frame, const WebIntentServiceInfo& service) { |
3163 string16 title = service.title(); | 3165 string16 title = service.title(); |
3164 if (title.empty()) | 3166 if (title.empty()) |
3165 title = webview()->mainFrame()->document().title(); | 3167 title = webview()->mainFrame()->document().title(); |
3166 | 3168 |
3167 Send(new IntentsHostMsg_RegisterIntentService(routing_id_, | 3169 Send(new IntentsHostMsg_RegisterIntentService(routing_id_, |
3168 service.action(), | 3170 service.action(), |
3169 service.type(), | 3171 service.type(), |
3170 service.url().spec().utf16(), | 3172 service.url().spec().utf16(), |
3171 title, | 3173 title, |
3172 service.disposition())); | 3174 service.disposition())); |
3173 } | 3175 } |
3174 | 3176 |
3175 void RenderViewImpl::dispatchIntent(WebKit::WebFrame* frame, | 3177 void RenderViewImpl::dispatchIntent( |
3176 const WebKit::WebIntentRequest& request) { | 3178 WebFrame* frame, const WebIntentRequest& intentRequest) { |
3177 WebKit::WebIntent intent(request.intent()); | 3179 webkit_glue::WebIntentData intent_data(intentRequest.intent()); |
3178 webkit_glue::WebIntentData intent_data(intent); | 3180 int id = intents_host_->RegisterWebIntent(intentRequest); |
3179 Send(new IntentsHostMsg_WebIntentDispatch( | 3181 Send(new IntentsHostMsg_WebIntentDispatch( |
3180 routing_id_, intent_data, intent.identifier())); | 3182 routing_id_, intent_data, id)); |
3181 } | 3183 } |
3182 | 3184 |
3183 // WebKit::WebPageSerializerClient implementation ------------------------------ | 3185 // WebKit::WebPageSerializerClient implementation ------------------------------ |
3184 | 3186 |
3185 void RenderViewImpl::didSerializeDataForFrame( | 3187 void RenderViewImpl::didSerializeDataForFrame( |
3186 const WebURL& frame_url, | 3188 const WebURL& frame_url, |
3187 const WebCString& data, | 3189 const WebCString& data, |
3188 WebPageSerializerClient::PageSerializationStatus status) { | 3190 WebPageSerializerClient::PageSerializationStatus status) { |
3189 Send(new ViewHostMsg_SendSerializedHtmlData( | 3191 Send(new ViewHostMsg_SendSerializedHtmlData( |
3190 routing_id(), | 3192 routing_id(), |
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4880 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 4882 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
4881 return !!RenderThreadImpl::current()->compositor_thread(); | 4883 return !!RenderThreadImpl::current()->compositor_thread(); |
4882 } | 4884 } |
4883 | 4885 |
4884 void RenderViewImpl::OnJavaBridgeInit() { | 4886 void RenderViewImpl::OnJavaBridgeInit() { |
4885 DCHECK(!java_bridge_dispatcher_.get()); | 4887 DCHECK(!java_bridge_dispatcher_.get()); |
4886 #if defined(ENABLE_JAVA_BRIDGE) | 4888 #if defined(ENABLE_JAVA_BRIDGE) |
4887 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 4889 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
4888 #endif | 4890 #endif |
4889 } | 4891 } |
OLD | NEW |