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

Unified Diff: ash/display/display_layout.h

Issue 1819533002: Convert ScopedVector<DisplayPlacement> to std::vector<DisplayPlacement> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jsonrefactor
Patch Set: 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 | « no previous file | 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 136360b685293967127f9fb796478d8feb056176..fd056130d76b067084ef440b4dca37a5ac1fdd88 100644
--- a/ash/display/display_layout.h
+++ b/ash/display/display_layout.h
@@ -13,7 +13,6 @@
#include "ash/ash_export.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
-#include "base/memory/scoped_vector.h"
#include "base/strings/string_piece.h"
namespace base {
@@ -61,9 +60,9 @@ struct ASH_EXPORT DisplayPlacement {
// based on the top/left edge of the primary display.
int offset;
- explicit DisplayPlacement(const DisplayPlacement& placement);
DisplayPlacement(Position position, int offset);
DisplayPlacement();
+ DisplayPlacement(const DisplayPlacement& placement);
DisplayPlacement& Swap();
@@ -82,7 +81,7 @@ class ASH_EXPORT DisplayLayout final {
// Validates the layout object.
static bool Validate(const DisplayIdList& list, const DisplayLayout& layout);
- ScopedVector<DisplayPlacement> placement_list;
+ std::vector<DisplayPlacement> placement_list;
// True if displays are mirrored.
bool mirrored;
@@ -102,9 +101,9 @@ class ASH_EXPORT DisplayLayout final {
// Returns string representation of the layout for debugging/testing.
std::string ToString() const;
- // Returns the DisplayPlacement entry in |placement_list| matching
- // |display_id| if it exists, otherwise returns nullptr.
- const DisplayPlacement* FindPlacementById(int64_t display_id) const;
+ // Returns the DisplayPlacement entry matching |display_id| if it exists,
+ // otherwise returns a DisplayPlacement with an invalid display id.
+ DisplayPlacement FindPlacementById(int64_t display_id) const;
private:
DISALLOW_COPY_AND_ASSIGN(DisplayLayout);
« no previous file with comments | « no previous file | ash/display/display_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698