Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: public/web/WebFrame.h

Issue 208393012: Revert of Framework for converting embedder uses of WebFrame to WebLocalFrame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « public/web/WebDocument.h ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 struct WebFloatRect; 78 struct WebFloatRect;
79 struct WebPoint; 79 struct WebPoint;
80 struct WebPrintParams; 80 struct WebPrintParams;
81 struct WebRect; 81 struct WebRect;
82 struct WebScriptSource; 82 struct WebScriptSource;
83 struct WebSize; 83 struct WebSize;
84 struct WebURLLoaderOptions; 84 struct WebURLLoaderOptions;
85 85
86 template <typename T> class WebVector; 86 template <typename T> class WebVector;
87 87
88 typedef class WebFrame WebLocalFrame;
89
90 class WebFrame { 88 class WebFrame {
91 public: 89 public:
92 // Control of renderTreeAsText output 90 // Control of renderTreeAsText output
93 enum RenderAsTextControl { 91 enum RenderAsTextControl {
94 RenderAsTextNormal = 0, 92 RenderAsTextNormal = 0,
95 RenderAsTextDebug = 1 << 0, 93 RenderAsTextDebug = 1 << 0,
96 RenderAsTextPrinting = 1 << 1 94 RenderAsTextPrinting = 1 << 1
97 }; 95 };
98 typedef unsigned RenderAsTextControls; 96 typedef unsigned RenderAsTextControls;
99 97
100 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). 98 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close().
101 // It is valid to pass a null client pointer. 99 // It is valid to pass a null client pointer.
102 BLINK_EXPORT static WebLocalFrame* create(WebFrameClient*); 100 BLINK_EXPORT static WebFrame* create(WebFrameClient*);
103 101
104 // Returns the number of live WebFrame objects, used for leak checking. 102 // Returns the number of live WebFrame objects, used for leak checking.
105 BLINK_EXPORT static int instanceCount(); 103 BLINK_EXPORT static int instanceCount();
106 104
107 // Returns the WebFrame associated with the current V8 context. This 105 // Returns the WebFrame associated with the current V8 context. This
108 // function can return 0 if the context is associated with a Document that 106 // function can return 0 if the context is associated with a Document that
109 // is not currently being displayed in a Frame. 107 // is not currently being displayed in a Frame.
110 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext(); 108 BLINK_EXPORT static WebFrame* frameForCurrentContext();
111 109
112 // Returns the frame corresponding to the given context. This can return 0 110 // Returns the frame corresponding to the given context. This can return 0
113 // if the context is detached from the frame, or if the context doesn't 111 // if the context is detached from the frame, or if the context doesn't
114 // correspond to a frame (e.g., workers). 112 // correspond to a frame (e.g., workers).
115 BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Handle<v8::Context>); 113 BLINK_EXPORT static WebFrame* frameForContext(v8::Handle<v8::Context>);
116 114
117 // Returns the frame inside a given frame or iframe element. Returns 0 if 115 // Returns the frame inside a given frame or iframe element. Returns 0 if
118 // the given element is not a frame, iframe or if the frame is empty. 116 // the given element is not a frame, iframe or if the frame is empty.
119 BLINK_EXPORT static WebLocalFrame* fromFrameOwnerElement(const WebElement&); 117 BLINK_EXPORT static WebFrame* fromFrameOwnerElement(const WebElement&);
120
121 virtual WebLocalFrame* toWebLocalFrame() = 0;
122 118
123 // This method closes and deletes the WebFrame. 119 // This method closes and deletes the WebFrame.
124 virtual void close() = 0; 120 virtual void close() = 0;
125 121
126 122
127 // Basic properties --------------------------------------------------- 123 // Basic properties ---------------------------------------------------
128 124
129 // The unique name of this frame. 125 // The unique name of this frame.
130 virtual WebString uniqueName() const = 0; 126 virtual WebString uniqueName() const = 0;
131 127
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 // text form. This is used only by layout tests. 658 // text form. This is used only by layout tests.
663 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; 659 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0;
664 660
665 protected: 661 protected:
666 ~WebFrame() { } 662 ~WebFrame() { }
667 }; 663 };
668 664
669 } // namespace blink 665 } // namespace blink
670 666
671 #endif 667 #endif
OLDNEW
« no previous file with comments | « public/web/WebDocument.h ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698