Chromium Code Reviews| Index: public/web/WebSelection.h |
| diff --git a/public/platform/WebWaitableEvent.h b/public/web/WebSelection.h |
| similarity index 70% |
| copy from public/platform/WebWaitableEvent.h |
| copy to public/web/WebSelection.h |
| index f1b59f0a263afe5afd887863e98d52d9cfa3e95e..3cde6e11daa640e0bceeaf36e9f06c269d91d2e9 100644 |
| --- a/public/platform/WebWaitableEvent.h |
| +++ b/public/web/WebSelection.h |
| @@ -28,28 +28,42 @@ |
| * 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() { } |
| +struct WebSelection { |
| + enum Type { |
| + TypeNone, |
| + TypeInsertion, |
| + TypeSelection, |
| + }; |
| - // Waits indefinitely for the event to be signaled. |
| - virtual void wait() = 0; |
| + WebSelection() |
| + : type(TypeNone) |
| + , anchorLayerId(0) |
| + , anchorDirection(WebTextDirectionDefault) |
| + , focusLayerId(0) |
| + , focusDirection(WebTextDirectionDefault) |
| + , anchorIsFirst(true) { } |
| - // 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; |
| + Type type; |
| + |
| + int anchorLayerId; |
| + WebRect anchorRectInLayer; |
| + WebTextDirection anchorDirection; |
| + |
| + int focusLayerId; |
| + WebRect focusRectInLayer; |
| + WebTextDirection focusDirection; |
| + |
| + bool anchorIsFirst; |
|
abarth-chromium
2014/06/13 21:38:15
I would have expected this state to hang off which
jdduke (slow)
2014/06/20 17:15:59
That's why each handle gets a specific (potentiall
|
| }; |
| } // namespace blink |
| -#endif // WebWaitableEvent_h |
| +#endif |