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

Unified Diff: public/web/WebSelectionBound.h

Issue 352173002: Expose public interface for composited selection bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« public/web/WebRuntimeFeatures.h ('K') | « public/web/WebRuntimeFeatures.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebSelectionBound.h
diff --git a/public/web/WebMenuItemInfo.h b/public/web/WebSelectionBound.h
similarity index 69%
copy from public/web/WebMenuItemInfo.h
copy to public/web/WebSelectionBound.h
index 2b08f42917d6c9bbde8052a329fe477aec4ab65f..54458682c7fd1744529d6b1f2b1109f674533db9 100644
--- a/public/web/WebMenuItemInfo.h
+++ b/public/web/WebSelectionBound.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,44 +28,36 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebMenuItemInfo_h
-#define WebMenuItemInfo_h
+#ifndef WebSelectionBound_h
+#define WebSelectionBound_h
-#include "../platform/WebCommon.h"
-#include "../platform/WebString.h"
-#include "../platform/WebVector.h"
-#include "WebTextDirection.h"
+#if INSIDE_BLINK
+#include "core/rendering/compositing/CompositedSelectionBound.h"
+#endif
+#include "public/platform/WebRect.h"
+#include "public/web/WebTextDirection.h"
namespace blink {
-struct WebMenuItemInfo {
- enum Type {
- Option,
- CheckableOption,
- Group,
- Separator,
- SubMenu
- };
-
- WebMenuItemInfo()
- : type(Option)
- , action(0)
+struct WebSelectionBound {
+ WebSelectionBound()
+ : layerId(0)
, textDirection(WebTextDirectionDefault)
- , hasTextDirectionOverride(false)
- , enabled(false)
- , checked(false)
{
}
- WebString label;
- WebString toolTip;
- Type type;
- unsigned action;
+#if INSIDE_BLINK
+ explicit WebSelectionBound(const WebCore::CompositedSelectionBound& bound)
+ : layerId(bound.layerId)
+ , layerRect(bound.layerRect)
+ , textDirection(bound.textDirection == WebCore::LTR ? WebTextDirectionLeftToRight : WebTextDirectionRightToLeft)
+ {
+ }
+#endif
+
+ int layerId;
+ WebRect layerRect;
WebTextDirection textDirection;
- WebVector<WebMenuItemInfo> subMenuItems;
- bool hasTextDirectionOverride;
- bool enabled;
- bool checked;
};
} // namespace blink
« public/web/WebRuntimeFeatures.h ('K') | « public/web/WebRuntimeFeatures.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698