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

Side by Side Diff: components/mus/ws/test_change_tracker.cc

Issue 1825273002: Add more out of line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 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/ws/test_change_tracker.h" 5 #include "components/mus/ws/test_change_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 : type(CHANGE_TYPE_EMBED), 191 : type(CHANGE_TYPE_EMBED),
192 connection_id(0), 192 connection_id(0),
193 window_id(0), 193 window_id(0),
194 window_id2(0), 194 window_id2(0),
195 window_id3(0), 195 window_id3(0),
196 event_action(0), 196 event_action(0),
197 direction(mojom::OrderDirection::ABOVE), 197 direction(mojom::OrderDirection::ABOVE),
198 bool_value(false), 198 bool_value(false),
199 change_id(0u) {} 199 change_id(0u) {}
200 200
201 Change::Change(const Change& other) = default;
202
201 Change::~Change() {} 203 Change::~Change() {}
202 204
203 TestChangeTracker::TestChangeTracker() : delegate_(NULL) {} 205 TestChangeTracker::TestChangeTracker() : delegate_(NULL) {}
204 206
205 TestChangeTracker::~TestChangeTracker() {} 207 TestChangeTracker::~TestChangeTracker() {}
206 208
207 void TestChangeTracker::OnEmbed(ConnectionSpecificId connection_id, 209 void TestChangeTracker::OnEmbed(ConnectionSpecificId connection_id,
208 mojom::WindowDataPtr root) { 210 mojom::WindowDataPtr root) {
209 Change change; 211 Change change;
210 change.type = CHANGE_TYPE_EMBED; 212 change.type = CHANGE_TYPE_EMBED;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 386 }
385 387
386 void TestChangeTracker::AddChange(const Change& change) { 388 void TestChangeTracker::AddChange(const Change& change) {
387 changes_.push_back(change); 389 changes_.push_back(change);
388 if (delegate_) 390 if (delegate_)
389 delegate_->OnChangeAdded(); 391 delegate_->OnChangeAdded();
390 } 392 }
391 393
392 TestWindow::TestWindow() {} 394 TestWindow::TestWindow() {}
393 395
396 TestWindow::TestWindow(const TestWindow& other) = default;
397
394 TestWindow::~TestWindow() {} 398 TestWindow::~TestWindow() {}
395 399
396 std::string TestWindow::ToString() const { 400 std::string TestWindow::ToString() const {
397 return base::StringPrintf("window=%s parent=%s", 401 return base::StringPrintf("window=%s parent=%s",
398 WindowIdToString(window_id).c_str(), 402 WindowIdToString(window_id).c_str(),
399 WindowIdToString(parent_id).c_str()); 403 WindowIdToString(parent_id).c_str());
400 } 404 }
401 405
402 std::string TestWindow::ToString2() const { 406 std::string TestWindow::ToString2() const {
403 return base::StringPrintf( 407 return base::StringPrintf(
404 "window=%s parent=%s visible=%s drawn=%s", 408 "window=%s parent=%s visible=%s drawn=%s",
405 WindowIdToString(window_id).c_str(), WindowIdToString(parent_id).c_str(), 409 WindowIdToString(window_id).c_str(), WindowIdToString(parent_id).c_str(),
406 visible ? "true" : "false", drawn ? "true" : "false"); 410 visible ? "true" : "false", drawn ? "true" : "false");
407 } 411 }
408 412
409 } // namespace ws 413 } // namespace ws
410 414
411 } // namespace mus 415 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/test_change_tracker.h ('k') | components/page_load_metrics/common/page_load_timing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698