| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "chrome/browser/ui/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 // Delegate implementation for BrowserViewLayout. Usually just forwards calls | 259 // Delegate implementation for BrowserViewLayout. Usually just forwards calls |
| 260 // into BrowserView. | 260 // into BrowserView. |
| 261 class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { | 261 class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { |
| 262 public: | 262 public: |
| 263 explicit BrowserViewLayoutDelegateImpl(BrowserView* browser_view) | 263 explicit BrowserViewLayoutDelegateImpl(BrowserView* browser_view) |
| 264 : browser_view_(browser_view) {} | 264 : browser_view_(browser_view) {} |
| 265 virtual ~BrowserViewLayoutDelegateImpl() {} | 265 virtual ~BrowserViewLayoutDelegateImpl() {} |
| 266 | 266 |
| 267 // BrowserViewLayoutDelegate overrides: | 267 // BrowserViewLayoutDelegate overrides: |
| 268 virtual views::View* GetContentsWebView() const OVERRIDE { |
| 269 return browser_view_->contents_web_view_; |
| 270 } |
| 271 |
| 268 virtual views::View* GetWindowSwitcherButton() const OVERRIDE { | 272 virtual views::View* GetWindowSwitcherButton() const OVERRIDE { |
| 269 return browser_view_->window_switcher_button(); | 273 return browser_view_->window_switcher_button(); |
| 270 } | 274 } |
| 271 | 275 |
| 272 virtual bool DownloadShelfNeedsLayout() const OVERRIDE { | 276 virtual bool DownloadShelfNeedsLayout() const OVERRIDE { |
| 273 DownloadShelfView* download_shelf = browser_view_->download_shelf_.get(); | 277 DownloadShelfView* download_shelf = browser_view_->download_shelf_.get(); |
| 274 // Re-layout the shelf either if it is visible or if its close animation | 278 // Re-layout the shelf either if it is visible or if its close animation |
| 275 // is currently running. | 279 // is currently running. |
| 276 return download_shelf && | 280 return download_shelf && |
| 277 (download_shelf->IsShowing() || download_shelf->IsClosing()); | 281 (download_shelf->IsShowing() || download_shelf->IsClosing()); |
| (...skipping 2328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2606 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2610 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
| 2607 gfx::Point icon_bottom( | 2611 gfx::Point icon_bottom( |
| 2608 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2612 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
| 2609 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2613 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
| 2610 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2614 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
| 2611 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2615 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
| 2612 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2616 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
| 2613 } | 2617 } |
| 2614 return top_arrow_height; | 2618 return top_arrow_height; |
| 2615 } | 2619 } |
| OLD | NEW |