| Index: chrome/browser/ui/views/location_bar/location_bar_container.h
|
| diff --git a/chrome/browser/ui/views/location_bar/location_bar_container.h b/chrome/browser/ui/views/location_bar/location_bar_container.h
|
| index ae25cb069237fdfd37dfe3d28e4eed63e5796247..1459e01725a456759ce32002e8ba633177f63d91 100644
|
| --- a/chrome/browser/ui/views/location_bar/location_bar_container.h
|
| +++ b/chrome/browser/ui/views/location_bar/location_bar_container.h
|
| @@ -49,9 +49,19 @@ class LocationBarContainer : public views::View,
|
| // animating.
|
| gfx::Rect GetTargetBounds();
|
|
|
| + // Set bounds for container and its child |location_bar_view_|.
|
| + // |location_bar_view_| is always at coordinates 0,0 of container, so only its
|
| + // size is required.
|
| + // If the |location_bar_container| is not contained within the parent
|
| + // BrowserView, it'll be smaller than child |location_bar_view_| and clip it.
|
| + void SetBoundsForContainerAndView(
|
| + const gfx::Rect& location_bar_container_bounds,
|
| + const gfx::Size& location_bar_view_size);
|
| +
|
| // views::View overrides:
|
| virtual std::string GetClassName() const OVERRIDE;
|
| virtual gfx::Size GetPreferredSize() OVERRIDE;
|
| + virtual void Layout() OVERRIDE;
|
| virtual bool SkipDefaultKeyEventProcessing(
|
| const ui::KeyEvent& event) OVERRIDE;
|
| virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
|
| @@ -82,6 +92,10 @@ class LocationBarContainer : public views::View,
|
|
|
| LocationBarView* location_bar_view_;
|
|
|
| + // Remember the size of |location_bar_view_| set via
|
| + // |SetBoundsForContainerAndView|.
|
| + gfx::Size location_bar_view_size_;
|
| +
|
| views::NativeViewHost* native_view_host_;
|
|
|
| bool in_toolbar_;
|
|
|