OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 #include "platform/graphics/Color.h" | 173 #include "platform/graphics/Color.h" |
174 #include "platform/graphics/GraphicsContext.h" | 174 #include "platform/graphics/GraphicsContext.h" |
175 #include "platform/graphics/GraphicsLayerClient.h" | 175 #include "platform/graphics/GraphicsLayerClient.h" |
176 #include "platform/graphics/paint/ClipRecorder.h" | 176 #include "platform/graphics/paint/ClipRecorder.h" |
177 #include "platform/graphics/paint/DisplayItemCacheSkipper.h" | 177 #include "platform/graphics/paint/DisplayItemCacheSkipper.h" |
178 #include "platform/graphics/paint/DrawingRecorder.h" | 178 #include "platform/graphics/paint/DrawingRecorder.h" |
179 #include "platform/graphics/paint/PaintRecordBuilder.h" | 179 #include "platform/graphics/paint/PaintRecordBuilder.h" |
180 #include "platform/graphics/skia/SkiaUtils.h" | 180 #include "platform/graphics/skia/SkiaUtils.h" |
181 #include "platform/heap/Handle.h" | 181 #include "platform/heap/Handle.h" |
182 #include "platform/instrumentation/tracing/TraceEvent.h" | 182 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 183 #include "platform/loader/fetch/FetchContext.h" |
183 #include "platform/loader/fetch/ResourceFetcher.h" | 184 #include "platform/loader/fetch/ResourceFetcher.h" |
184 #include "platform/loader/fetch/ResourceRequest.h" | 185 #include "platform/loader/fetch/ResourceRequest.h" |
185 #include "platform/loader/fetch/SubstituteData.h" | 186 #include "platform/loader/fetch/SubstituteData.h" |
186 #include "platform/scroll/ScrollTypes.h" | 187 #include "platform/scroll/ScrollTypes.h" |
187 #include "platform/scroll/ScrollbarTheme.h" | 188 #include "platform/scroll/ScrollbarTheme.h" |
188 #include "platform/weborigin/KURL.h" | 189 #include "platform/weborigin/KURL.h" |
189 #include "platform/weborigin/SchemeRegistry.h" | 190 #include "platform/weborigin/SchemeRegistry.h" |
190 #include "platform/weborigin/SecurityPolicy.h" | 191 #include "platform/weborigin/SecurityPolicy.h" |
191 #include "platform/wtf/CurrentTime.h" | 192 #include "platform/wtf/CurrentTime.h" |
192 #include "platform/wtf/HashMap.h" | 193 #include "platform/wtf/HashMap.h" |
193 #include "platform/wtf/PtrUtil.h" | 194 #include "platform/wtf/PtrUtil.h" |
194 #include "public/platform/WebDoubleSize.h" | 195 #include "public/platform/WebDoubleSize.h" |
195 #include "public/platform/WebFloatPoint.h" | 196 #include "public/platform/WebFloatPoint.h" |
196 #include "public/platform/WebFloatRect.h" | 197 #include "public/platform/WebFloatRect.h" |
197 #include "public/platform/WebLayer.h" | 198 #include "public/platform/WebLayer.h" |
198 #include "public/platform/WebPoint.h" | 199 #include "public/platform/WebPoint.h" |
199 #include "public/platform/WebRect.h" | 200 #include "public/platform/WebRect.h" |
200 #include "public/platform/WebSecurityOrigin.h" | 201 #include "public/platform/WebSecurityOrigin.h" |
201 #include "public/platform/WebSize.h" | 202 #include "public/platform/WebSize.h" |
202 #include "public/platform/WebURLError.h" | 203 #include "public/platform/WebURLError.h" |
| 204 #include "public/platform/WebURLLoader.h" |
203 #include "public/platform/WebVector.h" | 205 #include "public/platform/WebVector.h" |
204 #include "public/web/WebAssociatedURLLoaderOptions.h" | 206 #include "public/web/WebAssociatedURLLoaderOptions.h" |
205 #include "public/web/WebAutofillClient.h" | 207 #include "public/web/WebAutofillClient.h" |
206 #include "public/web/WebConsoleMessage.h" | 208 #include "public/web/WebConsoleMessage.h" |
207 #include "public/web/WebDOMEvent.h" | 209 #include "public/web/WebDOMEvent.h" |
208 #include "public/web/WebDocument.h" | 210 #include "public/web/WebDocument.h" |
209 #include "public/web/WebFindOptions.h" | 211 #include "public/web/WebFindOptions.h" |
210 #include "public/web/WebFormElement.h" | 212 #include "public/web/WebFormElement.h" |
211 #include "public/web/WebFrameClient.h" | 213 #include "public/web/WebFrameClient.h" |
212 #include "public/web/WebFrameOwnerProperties.h" | 214 #include "public/web/WebFrameOwnerProperties.h" |
(...skipping 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2423 } | 2425 } |
2424 | 2426 |
2425 void WebLocalFrameImpl::SetFrameWidget(WebFrameWidgetBase* frame_widget) { | 2427 void WebLocalFrameImpl::SetFrameWidget(WebFrameWidgetBase* frame_widget) { |
2426 frame_widget_ = frame_widget; | 2428 frame_widget_ = frame_widget; |
2427 } | 2429 } |
2428 | 2430 |
2429 WebFrameWidgetBase* WebLocalFrameImpl::FrameWidget() const { | 2431 WebFrameWidgetBase* WebLocalFrameImpl::FrameWidget() const { |
2430 return frame_widget_; | 2432 return frame_widget_; |
2431 } | 2433 } |
2432 | 2434 |
| 2435 std::unique_ptr<WebURLLoader> WebLocalFrameImpl::CreateURLLoader() { |
| 2436 DCHECK(frame_); |
| 2437 Document* document = frame_->GetDocument(); |
| 2438 DCHECK(document); |
| 2439 ResourceFetcher* fetcher = document->Fetcher(); |
| 2440 DCHECK(fetcher); |
| 2441 |
| 2442 return fetcher->Context().CreateURLLoader(); |
| 2443 } |
| 2444 |
2433 void WebLocalFrameImpl::CopyImageAt(const WebPoint& pos_in_viewport) { | 2445 void WebLocalFrameImpl::CopyImageAt(const WebPoint& pos_in_viewport) { |
2434 HitTestResult result = HitTestResultForVisualViewportPos(pos_in_viewport); | 2446 HitTestResult result = HitTestResultForVisualViewportPos(pos_in_viewport); |
2435 if (!isHTMLCanvasElement(result.InnerNodeOrImageMapImage()) && | 2447 if (!isHTMLCanvasElement(result.InnerNodeOrImageMapImage()) && |
2436 result.AbsoluteImageURL().IsEmpty()) { | 2448 result.AbsoluteImageURL().IsEmpty()) { |
2437 // There isn't actually an image at these coordinates. Might be because | 2449 // There isn't actually an image at these coordinates. Might be because |
2438 // the window scrolled while the context menu was open or because the page | 2450 // the window scrolled while the context menu was open or because the page |
2439 // changed itself between when we thought there was an image here and when | 2451 // changed itself between when we thought there was an image here and when |
2440 // we actually tried to retreive the image. | 2452 // we actually tried to retreive the image. |
2441 // | 2453 // |
2442 // FIXME: implement a cache of the most recent HitTestResult to avoid having | 2454 // FIXME: implement a cache of the most recent HitTestResult to avoid having |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2576 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { | 2588 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { |
2577 return *text_checker_client_; | 2589 return *text_checker_client_; |
2578 } | 2590 } |
2579 | 2591 |
2580 void WebLocalFrameImpl::SetTextCheckClient( | 2592 void WebLocalFrameImpl::SetTextCheckClient( |
2581 WebTextCheckClient* text_check_client) { | 2593 WebTextCheckClient* text_check_client) { |
2582 text_check_client_ = text_check_client; | 2594 text_check_client_ = text_check_client; |
2583 } | 2595 } |
2584 | 2596 |
2585 } // namespace blink | 2597 } // namespace blink |
OLD | NEW |