| Index: chrome/browser/ui/views/frame/browser_view.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/frame/browser_view.cc (revision 74117)
|
| +++ chrome/browser/ui/views/frame/browser_view.cc (working copy)
|
| @@ -262,14 +262,13 @@
|
| }
|
|
|
| virtual void Layout() {
|
| - views::View* parent_view = GetParent();
|
| - if (parent_view) {
|
| + if (parent()) {
|
| gfx::Size ps = GetPreferredSize();
|
| // No need to handle Right to left text direction here,
|
| // our parent must take care of it for us...
|
| // TODO(alekseys): fix it.
|
| - SetBounds(parent_view->width() - ps.width(),
|
| - parent_view->height() - ps.height(), ps.width(), ps.height());
|
| + SetBounds(parent()->width() - ps.width(),
|
| + parent()->height() - ps.height(), ps.width(), ps.height());
|
| }
|
| }
|
|
|
| @@ -478,7 +477,7 @@
|
|
|
| // The TabStrip attaches a listener to the model. Make sure we shut down the
|
| // TabStrip first so that it can cleanly remove the listener.
|
| - tabstrip_->GetParent()->RemoveChildView(tabstrip_);
|
| + tabstrip_->parent()->RemoveChildView(tabstrip_);
|
| delete tabstrip_;
|
| tabstrip_ = NULL;
|
|
|
| @@ -561,7 +560,7 @@
|
| gfx::Rect BrowserView::GetClientAreaBounds() const {
|
| gfx::Rect container_bounds = contents_->bounds();
|
| gfx::Point container_origin = container_bounds.origin();
|
| - ConvertPointToView(this, GetParent(), &container_origin);
|
| + ConvertPointToView(this, parent(), &container_origin);
|
| container_bounds.set_origin(container_origin);
|
| return container_bounds;
|
| }
|
| @@ -964,7 +963,7 @@
|
| if (focused_view) {
|
| for (int i = 0; i < count; ++i) {
|
| if (accessible_views[i] == focused_view ||
|
| - accessible_views[i]->IsParentOf(focused_view)) {
|
| + accessible_views[i]->Contains(focused_view)) {
|
| index = i;
|
| break;
|
| }
|
| @@ -1820,7 +1819,7 @@
|
| }
|
|
|
| bool BrowserView::SplitHandleMoved(views::SingleSplitView* view) {
|
| - for (int i = 0; i < view->GetChildViewCount(); ++i)
|
| + for (size_t i = 0; i < view->child_count(); ++i)
|
| view->GetChildViewAt(i)->InvalidateLayout();
|
| SchedulePaint();
|
| Layout();
|
| @@ -1834,9 +1833,8 @@
|
| void BrowserView::InitTabStrip(TabStripModel* model) {
|
| // Throw away the existing tabstrip if we're switching display modes.
|
| scoped_ptr<BaseTabStrip> old_strip(tabstrip_);
|
| - if (tabstrip_) {
|
| - tabstrip_->GetParent()->RemoveChildView(tabstrip_);
|
| - }
|
| + if (tabstrip_)
|
| + tabstrip_->parent()->RemoveChildView(tabstrip_);
|
|
|
| BrowserTabStripController* tabstrip_controller =
|
| new BrowserTabStripController(browser_.get(), model);
|
|
|