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

Unified Diff: components/mus/public/cpp/lib/window.cc

Issue 2008193002: Change mojo geometry structs from using type converters to StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: components/mus/public/cpp/lib/window.cc
diff --git a/components/mus/public/cpp/lib/window.cc b/components/mus/public/cpp/lib/window.cc
index b6a329c6dc94a79f599decd35dbde497bb7ab356..376cff6b6d0865277db064490f0f4d6abbe758e9 100644
--- a/components/mus/public/cpp/lib/window.cc
+++ b/components/mus/public/cpp/lib/window.cc
@@ -474,16 +474,6 @@ std::string Window::GetName() const {
////////////////////////////////////////////////////////////////////////////////
// Window, protected:
-namespace {
-
-mojom::ViewportMetricsPtr CreateEmptyViewportMetrics() {
- mojom::ViewportMetricsPtr metrics = mojom::ViewportMetrics::New();
- metrics->size_in_pixels = mojo::Size::New();
- return metrics;
-}
-
-} // namespace
-
Window::Window() : Window(nullptr, static_cast<Id>(-1)) {}
Window::~Window() {
@@ -549,7 +539,7 @@ Window::Window(WindowTreeConnection* connection, Id id)
// Matches aura, see aura::Window for details.
observers_(base::ObserverList<WindowObserver>::NOTIFY_EXISTING_ONLY),
input_event_handler_(nullptr),
- viewport_metrics_(CreateEmptyViewportMetrics()),
+ viewport_metrics_(mojom::ViewportMetrics::New()),
visible_(false),
opacity_(1.0f),
cursor_id_(mojom::Cursor::CURSOR_NULL),

Powered by Google App Engine
This is Rietveld 408576698