| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 namespace blink { | 56 namespace blink { |
| 57 | 57 |
| 58 class WebData; | 58 class WebData; |
| 59 class WebDataSource; | 59 class WebDataSource; |
| 60 class WebDocument; | 60 class WebDocument; |
| 61 class WebElement; | 61 class WebElement; |
| 62 class WebFormElement; | 62 class WebFormElement; |
| 63 class WebFrameClient; | 63 class WebFrameClient; |
| 64 class WebInputElement; | 64 class WebInputElement; |
| 65 class WebLayer; | 65 class WebLayer; |
| 66 class WebLocalFrame; |
| 66 class WebPerformance; | 67 class WebPerformance; |
| 67 class WebPermissionClient; | 68 class WebPermissionClient; |
| 68 class WebRange; | 69 class WebRange; |
| 69 class WebSecurityOrigin; | 70 class WebSecurityOrigin; |
| 70 class WebSharedWorkerRepositoryClient; | 71 class WebSharedWorkerRepositoryClient; |
| 71 class WebString; | 72 class WebString; |
| 72 class WebURL; | 73 class WebURL; |
| 73 class WebURLLoader; | 74 class WebURLLoader; |
| 74 class WebURLRequest; | 75 class WebURLRequest; |
| 75 class WebView; | 76 class WebView; |
| 76 struct WebConsoleMessage; | 77 struct WebConsoleMessage; |
| 77 struct WebFindOptions; | 78 struct WebFindOptions; |
| 78 struct WebFloatPoint; | 79 struct WebFloatPoint; |
| 79 struct WebFloatRect; | 80 struct WebFloatRect; |
| 80 struct WebPoint; | 81 struct WebPoint; |
| 81 struct WebPrintParams; | 82 struct WebPrintParams; |
| 82 struct WebRect; | 83 struct WebRect; |
| 83 struct WebScriptSource; | 84 struct WebScriptSource; |
| 84 struct WebSize; | 85 struct WebSize; |
| 85 struct WebURLLoaderOptions; | 86 struct WebURLLoaderOptions; |
| 86 | 87 |
| 87 template <typename T> class WebVector; | 88 template <typename T> class WebVector; |
| 88 | 89 |
| 89 typedef class WebFrame WebLocalFrame; | |
| 90 | |
| 91 class WebFrame { | 90 class WebFrame { |
| 92 public: | 91 public: |
| 93 // Control of renderTreeAsText output | 92 // Control of renderTreeAsText output |
| 94 enum RenderAsTextControl { | 93 enum RenderAsTextControl { |
| 95 RenderAsTextNormal = 0, | 94 RenderAsTextNormal = 0, |
| 96 RenderAsTextDebug = 1 << 0, | 95 RenderAsTextDebug = 1 << 0, |
| 97 RenderAsTextPrinting = 1 << 1 | 96 RenderAsTextPrinting = 1 << 1 |
| 98 }; | 97 }; |
| 99 typedef unsigned RenderAsTextControls; | 98 typedef unsigned RenderAsTextControls; |
| 100 | 99 |
| 101 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). | |
| 102 // It is valid to pass a null client pointer. | |
| 103 BLINK_EXPORT static WebLocalFrame* create(WebFrameClient*); | |
| 104 | |
| 105 // Returns the number of live WebFrame objects, used for leak checking. | 100 // Returns the number of live WebFrame objects, used for leak checking. |
| 106 BLINK_EXPORT static int instanceCount(); | 101 BLINK_EXPORT static int instanceCount(); |
| 107 | 102 |
| 108 // Returns the WebFrame associated with the current V8 context. This | |
| 109 // function can return 0 if the context is associated with a Document that | |
| 110 // is not currently being displayed in a Frame. | |
| 111 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext(); | |
| 112 | |
| 113 // Returns the frame corresponding to the given context. This can return 0 | |
| 114 // if the context is detached from the frame, or if the context doesn't | |
| 115 // correspond to a frame (e.g., workers). | |
| 116 BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Handle<v8::Context>); | |
| 117 | |
| 118 // Returns the frame inside a given frame or iframe element. Returns 0 if | |
| 119 // the given element is not a frame, iframe or if the frame is empty. | |
| 120 BLINK_EXPORT static WebLocalFrame* fromFrameOwnerElement(const WebElement&); | |
| 121 | |
| 122 virtual WebLocalFrame* toWebLocalFrame() = 0; | 103 virtual WebLocalFrame* toWebLocalFrame() = 0; |
| 123 | 104 |
| 124 // This method closes and deletes the WebFrame. | 105 // This method closes and deletes the WebFrame. |
| 125 virtual void close() = 0; | 106 virtual void close() = 0; |
| 126 | 107 |
| 127 | 108 |
| 128 // Basic properties --------------------------------------------------- | 109 // Basic properties --------------------------------------------------- |
| 129 | 110 |
| 130 // The unique name of this frame. | 111 // The unique name of this frame. |
| 131 virtual WebString uniqueName() const = 0; | 112 virtual WebString uniqueName() const = 0; |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 // text form. This is used only by layout tests. | 661 // text form. This is used only by layout tests. |
| 681 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; | 662 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; |
| 682 | 663 |
| 683 protected: | 664 protected: |
| 684 ~WebFrame() { } | 665 ~WebFrame() { } |
| 685 }; | 666 }; |
| 686 | 667 |
| 687 } // namespace blink | 668 } // namespace blink |
| 688 | 669 |
| 689 #endif | 670 #endif |
| OLD | NEW |