OLD | NEW |
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 "mojo/services/public/cpp/view_manager/node.h" | 5 #include "mojo/services/public/cpp/view_manager/node.h" |
6 | 6 |
7 #include "mojo/services/public/cpp/view_manager/lib/node_private.h" | 7 #include "mojo/services/public/cpp/view_manager/lib/node_private.h" |
8 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h" | 8 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h" |
9 #include "mojo/services/public/cpp/view_manager/lib/view_private.h" | 9 #include "mojo/services/public/cpp/view_manager/lib/view_private.h" |
10 #include "mojo/services/public/cpp/view_manager/node_observer.h" | 10 #include "mojo/services/public/cpp/view_manager/node_observer.h" |
11 #include "mojo/services/public/cpp/view_manager/view.h" | 11 #include "mojo/services/public/cpp/view_manager/view.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 namespace view_manager { | |
15 | 14 |
16 namespace { | 15 namespace { |
17 | 16 |
18 void NotifyViewTreeChangeAtReceiver( | 17 void NotifyViewTreeChangeAtReceiver( |
19 Node* receiver, | 18 Node* receiver, |
20 const NodeObserver::TreeChangeParams& params, | 19 const NodeObserver::TreeChangeParams& params, |
21 bool change_applied) { | 20 bool change_applied) { |
22 NodeObserver::TreeChangeParams local_params = params; | 21 NodeObserver::TreeChangeParams local_params = params; |
23 local_params.receiver = receiver; | 22 local_params.receiver = receiver; |
24 if (change_applied) { | 23 if (change_applied) { |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 ViewPrivate(active_view_).set_node(this); | 387 ViewPrivate(active_view_).set_node(this); |
389 } | 388 } |
390 | 389 |
391 void Node::LocalSetBounds(const gfx::Rect& old_bounds, | 390 void Node::LocalSetBounds(const gfx::Rect& old_bounds, |
392 const gfx::Rect& new_bounds) { | 391 const gfx::Rect& new_bounds) { |
393 DCHECK(old_bounds == bounds_); | 392 DCHECK(old_bounds == bounds_); |
394 ScopedSetBoundsNotifier notifier(this, old_bounds, new_bounds); | 393 ScopedSetBoundsNotifier notifier(this, old_bounds, new_bounds); |
395 bounds_ = new_bounds; | 394 bounds_ = new_bounds; |
396 } | 395 } |
397 | 396 |
398 } // namespace view_manager | |
399 } // namespace mojo | 397 } // namespace mojo |
OLD | NEW |