Home | History | Annotate | Download | only in aura

Lines Matching refs:child

146 // Does a depth first search for all descendants of |child| that have layers.
148 void GetLayersToStack(aura::Window* child, std::vector<ui::Layer*>* layers) {
149 if (child->layer()) {
150 layers->push_back(child->layer());
153 for (size_t i = 0; i < child->children().size(); ++i)
154 GetLayersToStack(child->children()[i], layers);
414 // existing child windows.
493 void Window::StackChildAtTop(Window* child) {
494 if (children_.size() <= 1 || child == children_.back())
496 StackChildAbove(child, children_.back());
499 void Window::StackChildAbove(Window* child, Window* target) {
500 StackChildRelativeTo(child, target, STACK_ABOVE);
503 void Window::StackChildAtBottom(Window* child) {
504 if (children_.size() <= 1 || child
506 StackChildBelow(child, children_.front());
509 void Window::StackChildBelow(Window* child, Window* target) {
510 StackChildRelativeTo(child, target, STACK_BELOW);
513 void Window::AddChild(Window* child) {
515 params.target = child;
517 params.old_parent = child->parent();
521 Window* old_root = child->GetRootWindow();
523 DCHECK(std::find(children_.begin(), children_.end(), child) ==
525 if (child->parent())
526 child->parent()->RemoveChildImpl(child, this);
531 child->parent_ = this;
534 offset += child->bounds().OffsetFromOrigin();
535 child->ReparentLayers(ancestor_with_layer->layer(), offset);
538 children_.push_back(child);
540 layout_manager_->OnWindowAddedToLayout(child);
541 FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowAdded(child));
542 child->OnParentChanged();
546 root_window->GetHost()->dispatcher()->OnWindowAddedToRootWindow(child);
547 child->NotifyAddedToRootWindow();
554 void Window::RemoveChild(Window* child) {
556 params.target = child;
562 RemoveChildImpl(child, NULL);
809 Window* child = *it;
810 child->PrintWindowHierarchy(depth + 1);
817 Window* child = children_[0];
818 if (child->owned_by_parent_) {
819 delete child;
820 // Deleting the child so remove it from out children_ list.
821 DCHECK(std::find(children_.begin(), children_.end(), child) ==
824 // Even if we can't delete the child, we still need to remove it from the
827 RemoveChild(child);
945 Window* child = children_[i];
946 if (!child->layer() && child->visible_) {
948 canvas->ClipRect(child->bounds());
950 canvas->Translate(child->bounds().OffsetFromOrigin());
951 child->Paint(canvas);
986 Window* child = *it;
989 if (child->ignore_events_)
993 if (client && !client->CanProcessEventsWithinSubtree(child))
996 child, local_point))
1001 ConvertPointToTarget(this, child, &point_in_child_coords);
1002 Window* match = child->GetWindowForPoint(point_in_child_coords,
1012 void Window::RemoveChildImpl(Window* child, Window* new_parent) {
1014 layout_manager_->OnWillRemoveWindowFromLayout(child);
1015 FOR_EACH_OBSERVER(WindowObserver, observers_, OnWillRemoveWindow(child));
1016 Window* root_window = child->GetRootWindow();
1019 child->NotifyRemovingFromRootWindow(new_root_window);
1023 child->UnparentLayers(!layer(), offset);
1024 child->parent_ = NULL;
1025 Windows::iterator i = std::find(children_.begin(), children_.end(), child);
1028 child->OnParentChanged();
1030 layout_manager_->OnWindowRemovedFromLayout(child);
1092 void Window::StackChildRelativeTo(Window* child,
1095 DCHECK_NE(child, target);
1096 DCHECK(child);
1098 DCHECK_EQ(this, child->parent());
1104 !stacking_client->AdjustStacking(&child, &target, &direction))
1108 std::find(children_.begin(), children_.end(), child) - children_.begin();
1112 // Don't move the child if it is already in the right place.
1122 children_.insert(children_.begin() + dest_i, child);
1124 StackChildLayerRelativeTo(child, target, direction);
1126 child->OnStackingChanged();
1129 void Window::StackChildLayerRelativeTo(Window* child,
1138 if (child->layer() && target->layer()) {
1140 ancestor_layer->StackAbove(child->layer(), target->layer());
1142 ancestor_layer->StackBelow(child->layer(), target->layer());
1147 GetLayersToStack(child, &layers);
1154 FindStackingTargetLayer<Windows::const_reverse_iterator>(target, child);
1157 FindStackingTargetLayer<Windows::const_iterator>(target, child);