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

Side by Side Diff: components/mus/public/cpp/tests/window_unittest.cc

Issue 1832133002: mus: Remove unnecessary const from property TypeConverter templates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/public/cpp/window.h" 5 #include "components/mus/public/cpp/window.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 const std::vector<uint8_t>* new_data) override { 784 const std::vector<uint8_t>* new_data) override {
785 changes_.push_back(base::StringPrintf( 785 changes_.push_back(base::StringPrintf(
786 "window=%s shared property changed key=%s old_value=%s new_value=%s", 786 "window=%s shared property changed key=%s old_value=%s new_value=%s",
787 WindowIdToString(window->id()).c_str(), name.c_str(), 787 WindowIdToString(window->id()).c_str(), name.c_str(),
788 VectorToString(old_data).c_str(), VectorToString(new_data).c_str())); 788 VectorToString(old_data).c_str(), VectorToString(new_data).c_str()));
789 } 789 }
790 790
791 std::string VectorToString(const std::vector<uint8_t>* data) { 791 std::string VectorToString(const std::vector<uint8_t>* data) {
792 if (!data) 792 if (!data)
793 return "NULL"; 793 return "NULL";
794 gfx::Size size = 794 gfx::Size size = mojo::ConvertTo<gfx::Size>(*data);
795 mojo::TypeConverter<gfx::Size, const std::vector<uint8_t>>::Convert(
796 *data);
797 return base::StringPrintf("%d,%d", size.width(), size.height()); 795 return base::StringPrintf("%d,%d", size.width(), size.height());
798 } 796 }
799 797
800 Window* window_; 798 Window* window_;
801 Changes changes_; 799 Changes changes_;
802 800
803 DISALLOW_COPY_AND_ASSIGN(SharedPropertyChangeObserver); 801 DISALLOW_COPY_AND_ASSIGN(SharedPropertyChangeObserver);
804 }; 802 };
805 803
806 } // namespace 804 } // namespace
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 scoped_ptr<TestWindow> window0(CreateTestWindow(1, parent.get())); 1124 scoped_ptr<TestWindow> window0(CreateTestWindow(1, parent.get()));
1127 scoped_ptr<TestWindow> window1(CreateTestWindow(2, parent.get())); 1125 scoped_ptr<TestWindow> window1(CreateTestWindow(2, parent.get()));
1128 1126
1129 TestWindow* window2 = CreateTestWindow(3, parent.get()); 1127 TestWindow* window2 = CreateTestWindow(3, parent.get());
1130 1128
1131 window0->AddTransientWindow(window2); 1129 window0->AddTransientWindow(window2);
1132 EXPECT_EQ("1 3 2", ChildWindowIDsAsString(parent.get())); 1130 EXPECT_EQ("1 3 2", ChildWindowIDsAsString(parent.get()));
1133 } 1131 }
1134 1132
1135 } // namespace mus 1133 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/window_tree_client_impl_unittest.cc ('k') | components/mus/public/cpp/window_property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698