| Index: chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm
|
| diff --git a/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm b/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm
|
| index 059b05d14a47acbdbf8b6885e55bb4daee8304b4..e13a12e783c61cb1c0f62e18f493682fd042aea7 100644
|
| --- a/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm
|
| +++ b/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm
|
| @@ -22,22 +22,21 @@ InstantOverlayControllerMac::~InstantOverlayControllerMac() {
|
|
|
| void InstantOverlayControllerMac::OverlayStateChanged(
|
| const InstantOverlayModel& model) {
|
| - if (model.mode().is_ntp() || model.mode().is_search_suggestions()) {
|
| - // Drop shadow is only needed if search mode is not |NTP| and overlay does
|
| - // not fill up the entire contents page.
|
| - BOOL drawDropShadow = !model.mode().is_ntp() &&
|
| - !(model.height() == 100 &&
|
| - model.height_units() == INSTANT_SIZE_PERCENT);
|
| - [overlay_ setOverlay:model.GetOverlayContents()
|
| + if (model.contents()) {
|
| + // Drop shadow is only needed if the overlay does not fill up the entire
|
| + // contents page. TODO(sail): Compute the actual height, a la Views code.
|
| + BOOL drawDropShadow =
|
| + model.height() != 100 || model.height_units() != INSTANT_SIZE_PERCENT;
|
| + [overlay_ setOverlay:model.contents()
|
| height:model.height()
|
| heightUnits:model.height_units()
|
| drawDropShadow:drawDropShadow];
|
| + browser_->MaybeUpdateBookmarkBarStateForInstantOverlay();
|
| } else {
|
| [overlay_ setOverlay:NULL
|
| height:0
|
| heightUnits:INSTANT_SIZE_PIXELS
|
| drawDropShadow:NO];
|
| }
|
| - browser_->MaybeUpdateBookmarkBarStateForInstantOverlay(model.mode());
|
| [window_ updateBookmarkBarStateForInstantOverlay];
|
| }
|
|
|