| Index: views/widget/root_view.cc | 
| =================================================================== | 
| --- views/widget/root_view.cc	(revision 74231) | 
| +++ views/widget/root_view.cc	(working copy) | 
| @@ -104,7 +104,7 @@ | 
| RootView::~RootView() { | 
| // If we have children remove them explicitly so to make sure a remove | 
| // notification is sent for each one of them. | 
| -  if (!child_views_.empty()) | 
| +  if (has_children()) | 
| RemoveAllChildViews(true); | 
|  | 
| if (pending_paint_task_) | 
| @@ -117,7 +117,7 @@ | 
| // The ContentsView must be set up _after_ the window is created so that its | 
| // Widget pointer is valid. | 
| SetLayoutManager(new FillLayout); | 
| -  if (GetChildViewCount() != 0) | 
| +  if (has_children()) | 
| RemoveAllChildViews(true); | 
| AddChildView(contents_view); | 
|  | 
| @@ -252,10 +252,14 @@ | 
| // | 
| ///////////////////////////////////////////////////////////////////////////// | 
|  | 
| -Widget* RootView::GetWidget() const { | 
| +const Widget* RootView::GetWidget() const { | 
| return widget_; | 
| } | 
|  | 
| +Widget* RootView::GetWidget() { | 
| +  return const_cast<Widget*>(const_cast<const RootView*>(this)->GetWidget()); | 
| +} | 
| + | 
| void RootView::NotifyThemeChanged() { | 
| View::PropagateThemeChanged(); | 
| } | 
| @@ -332,7 +336,7 @@ | 
| // Walk up the tree until we find a view that wants the touch event. | 
| for (touch_pressed_handler_ = GetViewForPoint(e.location()); | 
| touch_pressed_handler_ && (touch_pressed_handler_ != this); | 
| -       touch_pressed_handler_ = touch_pressed_handler_->GetParent()) { | 
| +       touch_pressed_handler_ = touch_pressed_handler_->parent()) { | 
| if (!touch_pressed_handler_->IsEnabled()) { | 
| // Disabled views eat events but are treated as not handled by the | 
| // the GestureManager. | 
| @@ -407,7 +411,7 @@ | 
| // Walk up the tree until we find a view that wants the mouse event. | 
| for (mouse_pressed_handler_ = GetViewForPoint(e.location()); | 
| mouse_pressed_handler_ && (mouse_pressed_handler_ != this); | 
| -       mouse_pressed_handler_ = mouse_pressed_handler_->GetParent()) { | 
| +       mouse_pressed_handler_ = mouse_pressed_handler_->parent()) { | 
| if (!mouse_pressed_handler_->IsEnabled()) { | 
| // Disabled views should eat events instead of propagating them upwards. | 
| hit_disabled_view = true; | 
| @@ -547,7 +551,7 @@ | 
| // disabled while handling moves, it's wrong to suddenly send ET_MOUSE_EXITED | 
| // and ET_MOUSE_ENTERED events, because the mouse hasn't actually exited yet. | 
| while (v && !v->IsEnabled() && (v != mouse_move_handler_)) | 
| -    v = v->GetParent(); | 
| +    v = v->parent(); | 
| if (v && v != this) { | 
| if (v != mouse_move_handler_) { | 
| if (mouse_move_handler_ != NULL) { | 
| @@ -681,7 +685,7 @@ | 
| v->ShowContextMenu(v->GetKeyboardContextMenuLocation(), false); | 
| return true; | 
| } | 
| -  for (; v && v != this && !consumed; v = v->GetParent()) { | 
| +  for (; v && v != this && !consumed; v = v->parent()) { | 
| consumed = (event.GetType() == Event::ET_KEY_PRESSED) ? | 
| v->OnKeyPressed(event) : v->OnKeyReleased(event); | 
| } | 
| @@ -699,10 +703,8 @@ | 
| View* v; | 
| bool consumed = false; | 
| if (GetFocusedView()) { | 
| -    for (v = GetFocusedView(); | 
| -         v && v != this && !consumed; v = v->GetParent()) { | 
| +    for (v = GetFocusedView(); v && v != this && !consumed; v = v->parent()) | 
| consumed = v->OnMouseWheel(e); | 
| -    } | 
| } | 
|  | 
| if (!consumed && default_keyboard_handler_) { | 
| @@ -736,10 +738,10 @@ | 
| if (view->registered_for_visible_bounds_notification_) | 
| return; | 
| view->registered_for_visible_bounds_notification_ = true; | 
| -  View* ancestor = view->GetParent(); | 
| +  View* ancestor = view->parent(); | 
| while (ancestor) { | 
| ancestor->AddDescendantToNotify(view); | 
| -    ancestor = ancestor->GetParent(); | 
| +    ancestor = ancestor->parent(); | 
| } | 
| } | 
|  | 
| @@ -748,10 +750,10 @@ | 
| if (!view->registered_for_visible_bounds_notification_) | 
| return; | 
| view->registered_for_visible_bounds_notification_ = false; | 
| -  View* ancestor = view->GetParent(); | 
| +  View* ancestor = view->parent(); | 
| while (ancestor) { | 
| ancestor->RemoveDescendantToNotify(view); | 
| -    ancestor = ancestor->GetParent(); | 
| +    ancestor = ancestor->parent(); | 
| } | 
| } | 
|  | 
|  |