Chromium Code Reviews| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 namespace v8 { | 43 namespace v8 { |
| 44 class Context; | 44 class Context; |
| 45 class Function; | 45 class Function; |
| 46 class Value; | 46 class Value; |
| 47 template <class T> | 47 template <class T> |
| 48 class Local; | 48 class Local; |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace blink { | 51 namespace blink { |
| 52 | 52 |
| 53 class Page; | |
| 53 class Frame; | 54 class Frame; |
| 54 class OpenedFrameTracker; | 55 class OpenedFrameTracker; |
| 55 class Visitor; | 56 class Visitor; |
| 56 class WebAssociatedURLLoader; | 57 class WebAssociatedURLLoader; |
| 57 struct WebAssociatedURLLoaderOptions; | 58 struct WebAssociatedURLLoaderOptions; |
| 58 class WebDOMEvent; | 59 class WebDOMEvent; |
| 59 class WebData; | 60 class WebData; |
| 60 class WebDataSource; | 61 class WebDataSource; |
| 61 class WebDocument; | 62 class WebDocument; |
| 62 class WebElement; | 63 class WebElement; |
| 63 class WebFrameImplBase; | |
| 64 class WebLocalFrame; | 64 class WebLocalFrame; |
| 65 class WebPerformance; | 65 class WebPerformance; |
| 66 class WebRemoteFrame; | 66 class WebRemoteFrame; |
| 67 class WebSecurityOrigin; | 67 class WebSecurityOrigin; |
| 68 class WebSharedWorkerRepositoryClient; | 68 class WebSharedWorkerRepositoryClient; |
| 69 class WebString; | 69 class WebString; |
| 70 class WebURL; | 70 class WebURL; |
| 71 class WebURLRequest; | 71 class WebURLRequest; |
| 72 class WebView; | 72 class WebView; |
| 73 enum class WebSandboxFlags; | 73 enum class WebSandboxFlags; |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 // Returns the number of live WebFrame objects, used for leak checking. | 103 // Returns the number of live WebFrame objects, used for leak checking. |
| 104 BLINK_EXPORT static int InstanceCount(); | 104 BLINK_EXPORT static int InstanceCount(); |
| 105 | 105 |
| 106 virtual bool IsWebLocalFrame() const = 0; | 106 virtual bool IsWebLocalFrame() const = 0; |
| 107 virtual WebLocalFrame* ToWebLocalFrame() = 0; | 107 virtual WebLocalFrame* ToWebLocalFrame() = 0; |
| 108 virtual bool IsWebRemoteFrame() const = 0; | 108 virtual bool IsWebRemoteFrame() const = 0; |
| 109 virtual WebRemoteFrame* ToWebRemoteFrame() = 0; | 109 virtual WebRemoteFrame* ToWebRemoteFrame() = 0; |
| 110 | 110 |
| 111 virtual void InitializeCoreFrame(Page&) = 0; | |
| 112 // TODO(dcheng): Rename this to coreFrame()? This probably also shouldn't be | |
| 113 // const... | |
| 114 virtual Frame* GetFrame() const = 0; | |
|
mustaq
2017/04/21 17:28:53
I think it makes sense to resolve this TODO in thi
| |
| 115 | |
| 111 BLINK_EXPORT bool Swap(WebFrame*); | 116 BLINK_EXPORT bool Swap(WebFrame*); |
| 112 | 117 |
| 113 // This method closes and deletes the WebFrame. This is typically called by | 118 // This method closes and deletes the WebFrame. This is typically called by |
| 114 // the embedder in response to a frame detached callback to the WebFrame | 119 // the embedder in response to a frame detached callback to the WebFrame |
| 115 // client. | 120 // client. |
| 116 virtual void Close(); | 121 virtual void Close(); |
| 117 | 122 |
| 118 // Called by the embedder when it needs to detach the subtree rooted at this | 123 // Called by the embedder when it needs to detach the subtree rooted at this |
| 119 // frame. | 124 // frame. |
| 120 BLINK_EXPORT void Detach(); | 125 BLINK_EXPORT void Detach(); |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 410 // Returns the bounds rect for current selection. If selection is performed | 415 // Returns the bounds rect for current selection. If selection is performed |
| 411 // on transformed text, the rect will still bound the selection but will | 416 // on transformed text, the rect will still bound the selection but will |
| 412 // not be transformed itself. If no selection is present, the rect will be | 417 // not be transformed itself. If no selection is present, the rect will be |
| 413 // empty ((0,0), (0,0)). | 418 // empty ((0,0), (0,0)). |
| 414 virtual WebRect SelectionBoundsRect() const = 0; | 419 virtual WebRect SelectionBoundsRect() const = 0; |
| 415 | 420 |
| 416 // Dumps the layer tree, used by the accelerated compositor, in | 421 // Dumps the layer tree, used by the accelerated compositor, in |
| 417 // text form. This is used only by layout tests. | 422 // text form. This is used only by layout tests. |
| 418 virtual WebString LayerTreeAsText(bool show_debug_info = false) const = 0; | 423 virtual WebString LayerTreeAsText(bool show_debug_info = false) const = 0; |
| 419 | 424 |
| 420 virtual WebFrameImplBase* ToImplBase() = 0; | |
| 421 // TODO(dcheng): Fix const-correctness issues and remove this overload. | |
| 422 virtual const WebFrameImplBase* ToImplBase() const { | |
| 423 return const_cast<WebFrame*>(this)->ToImplBase(); | |
| 424 } | |
| 425 | |
| 426 // Returns the frame inside a given frame or iframe element. Returns 0 if | 425 // Returns the frame inside a given frame or iframe element. Returns 0 if |
| 427 // the given element is not a frame, iframe or if the frame is empty. | 426 // the given element is not a frame, iframe or if the frame is empty. |
| 428 BLINK_EXPORT static WebFrame* FromFrameOwnerElement(const WebElement&); | 427 BLINK_EXPORT static WebFrame* FromFrameOwnerElement(const WebElement&); |
| 429 | 428 |
| 430 #if BLINK_IMPLEMENTATION | 429 #if BLINK_IMPLEMENTATION |
| 431 static WebFrame* FromFrame(Frame*); | 430 static WebFrame* FromFrame(Frame*); |
| 432 | 431 |
| 433 bool InShadowTree() const { return scope_ == WebTreeScopeType::kShadow; } | 432 bool InShadowTree() const { return scope_ == WebTreeScopeType::kShadow; } |
| 434 | 433 |
| 435 static void TraceFrames(Visitor*, WebFrame*); | 434 static void TraceFrames(Visitor*, WebFrame*); |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 461 WebFrame* first_child_; | 460 WebFrame* first_child_; |
| 462 WebFrame* last_child_; | 461 WebFrame* last_child_; |
| 463 | 462 |
| 464 WebFrame* opener_; | 463 WebFrame* opener_; |
| 465 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; | 464 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; |
| 466 }; | 465 }; |
| 467 | 466 |
| 468 } // namespace blink | 467 } // namespace blink |
| 469 | 468 |
| 470 #endif | 469 #endif |
| OLD | NEW |