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

Unified Diff: ash/display/display_layout.h

Issue 1808253004: Refactor JSONValueConverter Out of DisplayLayout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up some Includes Created 4 years, 9 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_layout.h
diff --git a/ash/display/display_layout.h b/ash/display/display_layout.h
index af80b68a7714fcfe387a065ca9f858013ce78703..136360b685293967127f9fb796478d8feb056176 100644
--- a/ash/display/display_layout.h
+++ b/ash/display/display_layout.h
@@ -14,16 +14,17 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
-
-namespace gfx {
-class Display;
-}
+#include "base/strings/string_piece.h"
namespace base {
class Value;
template <typename T> class JSONValueConverter;
}
+namespace gfx {
+class Display;
+}
+
namespace ash {
// An identifier used to manage display layout in DisplayManager /
@@ -68,10 +69,9 @@ struct ASH_EXPORT DisplayPlacement {
std::string ToString() const;
- // Used by JSONValueConverter to generate DisplayPlacement from a
- // JSON value. See json_value_converter.h.
- static void RegisterJSONConverter(
- base::JSONValueConverter<DisplayPlacement>* converter);
+ static std::string PositionToString(Position position);
+ static bool StringToPosition(const base::StringPiece& string,
+ Position* position);
};
class ASH_EXPORT DisplayLayout final {
@@ -79,15 +79,6 @@ class ASH_EXPORT DisplayLayout final {
DisplayLayout();
~DisplayLayout();
- // Converter functions to/from base::Value.
- static bool ConvertFromValue(const base::Value& value, DisplayLayout* layout);
- static bool ConvertToValue(const DisplayLayout& layout, base::Value* value);
-
- // Used by JSONValueConverter to generate DisplayLayout from a
- // JSON value. See json_value_converter.h.
- static void RegisterJSONConverter(
- base::JSONValueConverter<DisplayLayout>* converter);
-
// Validates the layout object.
static bool Validate(const DisplayIdList& list, const DisplayLayout& layout);
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698