Index: public/web/WebSelection.h |
diff --git a/public/platform/WebWaitableEvent.h b/public/web/WebSelection.h |
similarity index 68% |
copy from public/platform/WebWaitableEvent.h |
copy to public/web/WebSelection.h |
index f1b59f0a263afe5afd887863e98d52d9cfa3e95e..b2284710d603787957c40a1f17b59b574fdbbf98 100644 |
--- a/public/platform/WebWaitableEvent.h |
+++ b/public/web/WebSelection.h |
@@ -28,28 +28,46 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef WebWaitableEvent_h |
-#define WebWaitableEvent_h |
+#ifndef WebSelection_h |
+#define WebSelection_h |
-#include "WebCommon.h" |
+#include "../platform/WebRect.h" |
+#include "WebTextDirection.h" |
namespace blink { |
-// Provides a thread synchronization that can be used to allow one thread to |
-// wait until another thread to finish some work. |
-class WebWaitableEvent { |
-public: |
- virtual ~WebWaitableEvent() { } |
+class WebLayer; |
aelias_OOO_until_Jul13
2014/06/12 06:02:01
Delete this, now unused.
jdduke (slow)
2014/06/12 18:03:20
Done.
|
- // Waits indefinitely for the event to be signaled. |
- virtual void wait() = 0; |
+struct WebSelection { |
+ enum Type { |
+ TypeNone, |
+ TypeInsertion, |
+ TypeSelection, |
+ }; |
- // Puts the event in the signaled state. Causing any thread blocked on Wait |
- // to be woken up. The event state is reset to non-signaled after |
- // a waiting thread has been released. |
- virtual void signal() = 0; |
+ WebSelection() |
+ : type(TypeNone) |
+ , anchorLayerId(0) |
+ , anchorDirection(WebTextDirectionDefault) |
+ , focusLayerId(0) |
+ , focusDirection(WebTextDirectionDefault) |
+ , anchorIsFirst(true) { } |
+ |
+ Type type; |
+ |
+ int anchorLayerId; |
+ WebRect anchorRectInLayer; |
+ WebTextDirection anchorDirection; |
+ |
+ int focusLayerId; |
+ WebRect focusRectInLayer; |
+ WebTextDirection focusDirection; |
+ |
+ bool anchorIsFirst; |
+ |
+ // TODO(jdduke): Add local bounds for each handle. |
}; |
} // namespace blink |
-#endif // WebWaitableEvent_h |
+#endif |