| Index: chrome/browser/ui/views/frame/top_container_view.cc
|
| diff --git a/chrome/browser/ui/views/frame/top_container_view.cc b/chrome/browser/ui/views/frame/top_container_view.cc
|
| index 8e4e6a3eb184da672d5fb96a8330cc09c2b5a295..e597bab0f4fbe8374e5cd21d6562c9aeda22b9d9 100644
|
| --- a/chrome/browser/ui/views/frame/top_container_view.cc
|
| +++ b/chrome/browser/ui/views/frame/top_container_view.cc
|
| @@ -15,6 +15,17 @@ TopContainerView::TopContainerView(BrowserView* browser_view)
|
| TopContainerView::~TopContainerView() {
|
| }
|
|
|
| +gfx::Rect TopContainerView::GetTargetBoundsInScreen() const {
|
| + if (!parent())
|
| + return bounds();
|
| +
|
| + gfx::Point origin(parent()->GetBoundsInScreen().origin());
|
| + origin.Offset(GetMirroredX(), y());
|
| + if (layer())
|
| + layer()->GetTargetTransform().TransformPoint(origin);
|
| + return gfx::Rect(origin, size());
|
| +}
|
| +
|
| gfx::Size TopContainerView::GetPreferredSize() {
|
| // The view wants to be as wide as its parent and tall enough to fully show
|
| // its last child view.
|
| @@ -27,6 +38,13 @@ std::string TopContainerView::GetClassName() const {
|
| return "TopContainerView";
|
| }
|
|
|
| +void TopContainerView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
|
| + ImmersiveModeController* immersive_controller =
|
| + browser_view_->immersive_mode_controller();
|
| + if (immersive_controller->IsEnabled())
|
| + immersive_controller->OnTopContainerBoundsChanged();
|
| +}
|
| +
|
| void TopContainerView::PaintChildren(gfx::Canvas* canvas) {
|
| if (browser_view_->immersive_mode_controller()->IsRevealed()) {
|
| // Top-views depend on parts of the frame (themes, window buttons) being
|
|
|