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

Unified Diff: public/platform/WebSelectionBounds.h

Issue 929213004: Plumb selection bounds as a single unit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« Source/web/ChromeClientImpl.cpp ('K') | « public/platform/WebLayerTreeView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebSelectionBounds.h
diff --git a/public/platform/WebSelectionBounds.h b/public/platform/WebSelectionBounds.h
new file mode 100644
index 0000000000000000000000000000000000000000..8ab016f3a85fb8a64d3ed9f48f883ae7cc547138
--- /dev/null
+++ b/public/platform/WebSelectionBounds.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebSelectionBounds_h
+#define WebSelectionBounds_h
+
+#include "public/platform/WebSelectionBound.h"
+
+namespace blink {
+
+// The endpoints for an active selection region.
+struct WebSelectionBounds {
+
+ WebSelectionBounds(const WebSelectionBound& start, const WebSelectionBound& end)
+ : start(start)
+ , end(end)
+ , length(0)
+ , isEditable(false)
+ , isUserTriggered(false)
+ {
+ }
+
+ WebSelectionBound start;
+ WebSelectionBound end;
+
+ // The length, in characters, of the selection.
+ size_t length;
+
+ // Whether the selection region is editable.
+ bool isEditable;
+
+ // Whether the selection was triggered by a user.
+ bool isUserTriggered;
+};
+
+} // namespace blink
+
+#endif
« Source/web/ChromeClientImpl.cpp ('K') | « public/platform/WebLayerTreeView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698