Index: components/mus/public/cpp/lib/view_tree_client_impl.cc |
diff --git a/components/view_manager/public/cpp/lib/view_tree_client_impl.cc b/components/mus/public/cpp/lib/view_tree_client_impl.cc |
similarity index 90% |
rename from components/view_manager/public/cpp/lib/view_tree_client_impl.cc |
rename to components/mus/public/cpp/lib/view_tree_client_impl.cc |
index 31a2a1364e142f6bbd6e89e032f176dab452f360..b7a157d14ca8823953fcf8f44609c23e6f97583f 100644 |
--- a/components/view_manager/public/cpp/lib/view_tree_client_impl.cc |
+++ b/components/mus/public/cpp/lib/view_tree_client_impl.cc |
@@ -2,13 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "components/view_manager/public/cpp/lib/view_tree_client_impl.h" |
+#include "components/mus/public/cpp/lib/view_tree_client_impl.h" |
-#include "components/view_manager/public/cpp/lib/view_private.h" |
-#include "components/view_manager/public/cpp/util.h" |
-#include "components/view_manager/public/cpp/view_observer.h" |
-#include "components/view_manager/public/cpp/view_tree_connection.h" |
-#include "components/view_manager/public/cpp/view_tree_delegate.h" |
+#include "components/mus/public/cpp/lib/view_private.h" |
+#include "components/mus/public/cpp/util.h" |
+#include "components/mus/public/cpp/view_observer.h" |
+#include "components/mus/public/cpp/view_tree_connection.h" |
+#include "components/mus/public/cpp/view_tree_delegate.h" |
#include "mojo/application/public/cpp/application_impl.h" |
#include "mojo/application/public/cpp/connect.h" |
#include "mojo/application/public/cpp/service_provider_impl.h" |
@@ -74,9 +74,8 @@ ViewTreeConnection* ViewTreeConnection::Create( |
return new ViewTreeClientImpl(delegate, request.Pass()); |
} |
-ViewTreeClientImpl::ViewTreeClientImpl( |
- ViewTreeDelegate* delegate, |
- InterfaceRequest<ViewTreeClient> request) |
+ViewTreeClientImpl::ViewTreeClientImpl(ViewTreeDelegate* delegate, |
+ InterfaceRequest<ViewTreeClient> request) |
: connection_id_(0), |
next_id_(1), |
delegate_(delegate), |
@@ -86,8 +85,7 @@ ViewTreeClientImpl::ViewTreeClientImpl( |
activated_view_(nullptr), |
binding_(this, request.Pass()), |
is_embed_root_(false), |
- in_destructor_(false) { |
-} |
+ in_destructor_(false) {} |
ViewTreeClientImpl::~ViewTreeClientImpl() { |
in_destructor_ = true; |
@@ -128,10 +126,9 @@ void ViewTreeClientImpl::RemoveChild(Id child_id, Id parent_id) { |
tree_->RemoveViewFromParent(child_id, ActionCompletedCallback()); |
} |
-void ViewTreeClientImpl::Reorder( |
- Id view_id, |
- Id relative_view_id, |
- OrderDirection direction) { |
+void ViewTreeClientImpl::Reorder(Id view_id, |
+ Id relative_view_id, |
+ OrderDirection direction) { |
DCHECK(tree_); |
tree_->ReorderView(view_id, relative_view_id, direction, |
ActionCompletedCallback()); |
@@ -158,14 +155,11 @@ void ViewTreeClientImpl::SetVisible(Id view_id, bool visible) { |
tree_->SetViewVisibility(view_id, visible, ActionCompletedCallback()); |
} |
-void ViewTreeClientImpl::SetProperty( |
- Id view_id, |
- const std::string& name, |
- const std::vector<uint8_t>& data) { |
+void ViewTreeClientImpl::SetProperty(Id view_id, |
+ const std::string& name, |
+ const std::vector<uint8_t>& data) { |
DCHECK(tree_); |
- tree_->SetViewProperty(view_id, |
- String(name), |
- Array<uint8_t>::From(data), |
+ tree_->SetViewProperty(view_id, String(name), Array<uint8_t>::From(data), |
ActionCompletedCallback()); |
} |
@@ -334,8 +328,7 @@ void ViewTreeClientImpl::OnViewHierarchyChanged( |
Id new_parent_id, |
Id old_parent_id, |
mojo::Array<ViewDataPtr> views) { |
- View* initial_parent = views.size() ? |
- GetViewById(views[0]->parent_id) : NULL; |
+ View* initial_parent = views.size() ? GetViewById(views[0]->parent_id) : NULL; |
const bool was_view_known = GetViewById(view_id) != nullptr; |
@@ -385,10 +378,9 @@ void ViewTreeClientImpl::OnViewDrawnStateChanged(Id view_id, bool drawn) { |
ViewPrivate(view).LocalSetDrawn(drawn); |
} |
-void ViewTreeClientImpl::OnViewSharedPropertyChanged( |
- Id view_id, |
- const String& name, |
- Array<uint8_t> new_data) { |
+void ViewTreeClientImpl::OnViewSharedPropertyChanged(Id view_id, |
+ const String& name, |
+ Array<uint8_t> new_data) { |
View* view = GetViewById(view_id); |
if (view) { |
std::vector<uint8_t> data; |
@@ -408,8 +400,7 @@ void ViewTreeClientImpl::OnViewInputEvent( |
const Callback<void()>& ack_callback) { |
View* view = GetViewById(view_id); |
if (view) { |
- FOR_EACH_OBSERVER(ViewObserver, |
- *ViewPrivate(view).observers(), |
+ FOR_EACH_OBSERVER(ViewObserver, *ViewPrivate(view).observers(), |
OnViewInputEvent(view, event)); |
} |
ack_callback.Run(); |