Lines Matching defs:DisplayLayout
19 // The maximum value for 'offset' in DisplayLayout in case of outliers. Need
29 typedef std::map<DisplayLayout::Position, std::string> PositionToStringMap;
33 DisplayLayout::TOP, "top",
34 DisplayLayout::BOTTOM, "bottom",
35 DisplayLayout::RIGHT, "right",
36 DisplayLayout::LEFT, "left");
41 DisplayLayout::Position* field) {
48 std::string GetStringFromPosition(DisplayLayout::Position position) {
61 // DisplayLayout
64 DisplayLayout DisplayLayout::FromInts(int position, int offsets) {
65 return DisplayLayout(static_cast<Position>(position), offsets);
68 DisplayLayout::DisplayLayout()
75 DisplayLayout::DisplayLayout(DisplayLayout::Position position, int offset)
91 DisplayLayout DisplayLayout::Invert() const {
107 DisplayLayout ret = DisplayLayout(inverted_position, -offset);
113 bool DisplayLayout::ConvertFromValue(const base::Value& value,
114 DisplayLayout* layout) {
115 base::JSONValueConverter<DisplayLayout> converter;
120 bool DisplayLayout::ConvertToValue(const DisplayLayout& layout,
134 std::string DisplayLayout::ToString() const {
142 void DisplayLayout::RegisterJSONConverter(
143 base::JSONValueConverter<DisplayLayout>* converter) {
145 kPositionKey, &DisplayLayout::position, &GetPositionFromString);
146 converter->RegisterIntField(kOffsetKey, &DisplayLayout::offset);
147 converter->RegisterBoolField(kMirroredKey, &DisplayLayout::mirrored);
149 kPrimaryIdKey, &DisplayLayout::primary_id, &GetDisplayIdFromString);