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

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

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/lib/window_tree_client_impl.h" 5 #include "components/mus/public/cpp/lib/window_tree_client_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 private: 74 private:
75 WindowTreeClientImpl* tree_client_impl_; 75 WindowTreeClientImpl* tree_client_impl_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImplPrivate); 77 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImplPrivate);
78 }; 78 };
79 79
80 class WindowTreeSetup { 80 class WindowTreeSetup {
81 public: 81 public:
82 WindowTreeSetup() : tree_client_(&window_tree_delegate_, nullptr, nullptr) { 82 WindowTreeSetup() : tree_client_(&window_tree_delegate_, nullptr, nullptr) {
83 WindowTreeClientImplPrivate(&tree_client_) 83 WindowTreeClientImplPrivate(&tree_client_)
84 .Init(&window_tree_, mojom::WindowTree::ACCESS_POLICY_DEFAULT); 84 .Init(&window_tree_, mojom::WindowTree::kAccessPolicyDefault);
85 window_tree_.GetAndClearChangeId(nullptr); 85 window_tree_.GetAndClearChangeId(nullptr);
86 } 86 }
87 87
88 WindowTreeConnection* window_tree_connection() { 88 WindowTreeConnection* window_tree_connection() {
89 return static_cast<WindowTreeConnection*>(&tree_client_); 89 return static_cast<WindowTreeConnection*>(&tree_client_);
90 } 90 }
91 91
92 mojom::WindowTreeClient* window_tree_client() { 92 mojom::WindowTreeClient* window_tree_client() {
93 return static_cast<mojom::WindowTreeClient*>(&tree_client_); 93 return static_cast<mojom::WindowTreeClient*>(&tree_client_);
94 } 94 }
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // ToggleVisibilityFromDestroyedObserver::OnWindowDestroyed(), which toggles 480 // ToggleVisibilityFromDestroyedObserver::OnWindowDestroyed(), which toggles
481 // the visibility of the window. Ack the change, which should not crash or 481 // the visibility of the window. Ack the change, which should not crash or
482 // trigger DCHECKs. 482 // trigger DCHECKs.
483 child1->Destroy(); 483 child1->Destroy();
484 uint32_t change_id; 484 uint32_t change_id;
485 ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id)); 485 ASSERT_TRUE(setup.window_tree()->GetAndClearChangeId(&change_id));
486 setup.window_tree_client()->OnChangeCompleted(change_id, true); 486 setup.window_tree_client()->OnChangeCompleted(change_id, true);
487 } 487 }
488 488
489 } // namespace mus 489 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698