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

Unified Diff: public/web/WebSelection.h

Issue 302993003: Route selection bounds updates through WebLayerTreeView (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Attach to proper scrolling layer Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698