| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 class WebPluginContainerImpl; | 65 class WebPluginContainerImpl; |
| 66 class WebView; | 66 class WebView; |
| 67 class WebViewImpl; | 67 class WebViewImpl; |
| 68 struct FrameLoadRequest; | 68 struct FrameLoadRequest; |
| 69 struct WebPrintParams; | 69 struct WebPrintParams; |
| 70 struct WindowFeatures; | 70 struct WindowFeatures; |
| 71 | 71 |
| 72 template <typename T> class WebVector; | 72 template <typename T> class WebVector; |
| 73 | 73 |
| 74 // Implementation of WebFrame, note that this is a reference counted object. | 74 // Implementation of WebFrame, note that this is a reference counted object. |
| 75 class WebLocalFrameImpl FINAL | 75 class WebLocalFrameImpl FINAL : public RefCountedWillBeGarbageCollectedFinalized
<WebLocalFrameImpl>, public WebLocalFrame { |
| 76 : public WebLocalFrame | |
| 77 , public RefCounted<WebLocalFrameImpl> { | |
| 78 public: | 76 public: |
| 79 // WebFrame methods: | 77 // WebFrame methods: |
| 80 virtual bool isWebLocalFrame() const OVERRIDE; | 78 virtual bool isWebLocalFrame() const OVERRIDE; |
| 81 virtual WebLocalFrame* toWebLocalFrame() OVERRIDE; | 79 virtual WebLocalFrame* toWebLocalFrame() OVERRIDE; |
| 82 virtual bool isWebRemoteFrame() const OVERRIDE; | 80 virtual bool isWebRemoteFrame() const OVERRIDE; |
| 83 virtual WebRemoteFrame* toWebRemoteFrame() OVERRIDE; | 81 virtual WebRemoteFrame* toWebRemoteFrame() OVERRIDE; |
| 84 virtual void close() OVERRIDE; | 82 virtual void close() OVERRIDE; |
| 85 virtual WebString uniqueName() const OVERRIDE; | 83 virtual WebString uniqueName() const OVERRIDE; |
| 86 virtual WebString assignedName() const OVERRIDE; | 84 virtual WebString assignedName() const OVERRIDE; |
| 87 virtual void setName(const WebString&) OVERRIDE; | 85 virtual void setName(const WebString&) OVERRIDE; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE
; | 227 virtual WebString layerTreeAsText(bool showDebugInfo = false) const OVERRIDE
; |
| 230 | 228 |
| 231 // WebLocalFrame methods: | 229 // WebLocalFrame methods: |
| 232 virtual void addStyleSheetByURL(const WebString& url) OVERRIDE; | 230 virtual void addStyleSheetByURL(const WebString& url) OVERRIDE; |
| 233 | 231 |
| 234 void willDetachParent(); | 232 void willDetachParent(); |
| 235 | 233 |
| 236 static WebLocalFrameImpl* create(WebFrameClient*); | 234 static WebLocalFrameImpl* create(WebFrameClient*); |
| 237 virtual ~WebLocalFrameImpl(); | 235 virtual ~WebLocalFrameImpl(); |
| 238 | 236 |
| 239 PassRefPtr<LocalFrame> initializeCoreFrame(FrameHost*, FrameOwner*, const At
omicString& name, const AtomicString& fallbackName); | 237 PassRefPtrWillBeRawPtr<LocalFrame> initializeCoreFrame(FrameHost*, FrameOwne
r*, const AtomicString& name, const AtomicString& fallbackName); |
| 240 | 238 |
| 241 PassRefPtr<LocalFrame> createChildFrame( | 239 PassRefPtrWillBeRawPtr<LocalFrame> createChildFrame(const FrameLoadRequest&,
HTMLFrameOwnerElement*); |
| 242 const FrameLoadRequest&, HTMLFrameOwnerElement*); | |
| 243 | 240 |
| 244 void didChangeContentsSize(const IntSize&); | 241 void didChangeContentsSize(const IntSize&); |
| 245 | 242 |
| 246 void createFrameView(); | 243 void createFrameView(); |
| 247 | 244 |
| 248 static WebLocalFrameImpl* fromFrame(LocalFrame*); | 245 static WebLocalFrameImpl* fromFrame(LocalFrame*); |
| 249 static WebLocalFrameImpl* fromFrame(LocalFrame&); | 246 static WebLocalFrameImpl* fromFrame(LocalFrame&); |
| 250 static WebLocalFrameImpl* fromFrameOwnerElement(Element*); | 247 static WebLocalFrameImpl* fromFrameOwnerElement(Element*); |
| 251 | 248 |
| 252 // If the frame hosts a PluginDocument, this method returns the WebPluginCon
tainerImpl | 249 // If the frame hosts a PluginDocument, this method returns the WebPluginCon
tainerImpl |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 | 305 |
| 309 // Invalidates vertical scrollbar only. | 306 // Invalidates vertical scrollbar only. |
| 310 void invalidateScrollbar() const; | 307 void invalidateScrollbar() const; |
| 311 | 308 |
| 312 // Invalidates both content area and the scrollbar. | 309 // Invalidates both content area and the scrollbar. |
| 313 void invalidateAll() const; | 310 void invalidateAll() const; |
| 314 | 311 |
| 315 // Returns a hit-tested VisiblePosition for the given point | 312 // Returns a hit-tested VisiblePosition for the given point |
| 316 VisiblePosition visiblePositionForWindowPoint(const WebPoint&); | 313 VisiblePosition visiblePositionForWindowPoint(const WebPoint&); |
| 317 | 314 |
| 315 void trace(Visitor*); |
| 316 |
| 318 private: | 317 private: |
| 319 friend class FrameLoaderClientImpl; | 318 friend class FrameLoaderClientImpl; |
| 320 | 319 |
| 321 explicit WebLocalFrameImpl(WebFrameClient*); | 320 explicit WebLocalFrameImpl(WebFrameClient*); |
| 322 | 321 |
| 323 // Sets the local core frame and registers destruction observers. | 322 // Sets the local core frame and registers destruction observers. |
| 324 void setCoreFrame(PassRefPtr<LocalFrame>); | 323 void setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame>); |
| 325 | 324 |
| 326 void loadJavaScriptURL(const KURL&); | 325 void loadJavaScriptURL(const KURL&); |
| 327 | 326 |
| 328 WebPlugin* focusedPluginIfInputMethodSupported(); | 327 WebPlugin* focusedPluginIfInputMethodSupported(); |
| 329 | 328 |
| 330 FrameLoaderClientImpl m_frameLoaderClientImpl; | 329 FrameLoaderClientImpl m_frameLoaderClientImpl; |
| 331 | 330 |
| 332 // The embedder retains a reference to the WebCore LocalFrame while it is ac
tive in the DOM. This | 331 // The embedder retains a reference to the WebCore LocalFrame while it is ac
tive in the DOM. This |
| 333 // reference is released when the frame is removed from the DOM or the entir
e page is closed. | 332 // reference is released when the frame is removed from the DOM or the entir
e page is closed. |
| 334 // FIXME: These will need to change to WebFrame when we introduce WebFramePr
oxy. | 333 // FIXME: These will need to change to WebFrame when we introduce WebFramePr
oxy. |
| 335 RefPtr<LocalFrame> m_frame; | 334 RefPtrWillBeMember<LocalFrame> m_frame; |
| 336 | 335 |
| 337 // Indicate whether the current LocalFrame is local or remote. Remote frames
are | 336 // Indicate whether the current LocalFrame is local or remote. Remote frames
are |
| 338 // rendered in a different process from their parent frames. | 337 // rendered in a different process from their parent frames. |
| 339 bool m_isRemote; | 338 bool m_isRemote; |
| 340 | 339 |
| 341 WebFrameClient* m_client; | 340 WebFrameClient* m_client; |
| 342 WebPermissionClient* m_permissionClient; | 341 WebPermissionClient* m_permissionClient; |
| 343 OwnPtr<SharedWorkerRepositoryClientImpl> m_sharedWorkerRepositoryClient; | 342 OwnPtr<SharedWorkerRepositoryClientImpl> m_sharedWorkerRepositoryClient; |
| 344 | 343 |
| 345 // Will be initialized after first call to find() or scopeStringMatches(). | 344 // Will be initialized after first call to find() or scopeStringMatches(). |
| 346 OwnPtr<TextFinder> m_textFinder; | 345 OwnPtr<TextFinder> m_textFinder; |
| 347 | 346 |
| 348 // Valid between calls to BeginPrint() and EndPrint(). Containts the print | 347 // Valid between calls to BeginPrint() and EndPrint(). Containts the print |
| 349 // information. Is used by PrintPage(). | 348 // information. Is used by PrintPage(). |
| 350 OwnPtrWillBePersistent<ChromePrintContext> m_printContext; | 349 OwnPtrWillBeMember<ChromePrintContext> m_printContext; |
| 351 | 350 |
| 352 // Stores the additional input events offset and scale when device metrics e
mulation is enabled. | 351 // Stores the additional input events offset and scale when device metrics e
mulation is enabled. |
| 353 IntSize m_inputEventsOffsetForEmulation; | 352 IntSize m_inputEventsOffsetForEmulation; |
| 354 float m_inputEventsScaleFactorForEmulation; | 353 float m_inputEventsScaleFactorForEmulation; |
| 355 | 354 |
| 356 UserMediaClientImpl m_userMediaClientImpl; | 355 UserMediaClientImpl m_userMediaClientImpl; |
| 357 | 356 |
| 358 OwnPtrWillBePersistent<GeolocationClientProxy> m_geolocationClientProxy; | 357 OwnPtrWillBeMember<GeolocationClientProxy> m_geolocationClientProxy; |
| 359 }; | 358 }; |
| 360 | 359 |
| 361 DEFINE_TYPE_CASTS(WebLocalFrameImpl, WebFrame, frame, frame->isWebLocalFrame(),
frame.isWebLocalFrame()); | 360 DEFINE_TYPE_CASTS(WebLocalFrameImpl, WebFrame, frame, frame->isWebLocalFrame(),
frame.isWebLocalFrame()); |
| 362 | 361 |
| 363 } // namespace blink | 362 } // namespace blink |
| 364 | 363 |
| 365 #endif | 364 #endif |
| OLD | NEW |