Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm

Issue 2740993002: Remove unused instant_overlay_controller_mac.h/mm (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h"
6
7 #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
8 #include "chrome/browser/ui/search/instant_overlay_model.h"
9
10 InstantOverlayControllerMac::InstantOverlayControllerMac(
11 Browser* browser,
12 OverlayableContentsController* overlay)
13 : InstantOverlayController(browser),
14 overlay_(overlay) {
15 }
16
17 InstantOverlayControllerMac::~InstantOverlayControllerMac() {
18 }
19
20 void InstantOverlayControllerMac::OverlayStateChanged(
21 const InstantOverlayModel& model) {
22 if (model.mode().is_ntp() || model.mode().is_search_suggestions()) {
23 // Drop shadow is only needed if search mode is not |NTP| and overlay does
24 // not fill up the entire contents page.
25 BOOL drawDropShadow = !model.mode().is_ntp() &&
26 !(model.height() == 100 &&
27 model.height_units() == INSTANT_SIZE_PERCENT);
28 [overlay_ setOverlay:model.GetOverlayContents()
29 height:model.height()
30 heightUnits:model.height_units()
31 drawDropShadow:drawDropShadow];
32 } else if ([overlay_ isShowingOverlay]) {
33 [overlay_ setOverlay:NULL
34 height:0
35 heightUnits:INSTANT_SIZE_PIXELS
36 drawDropShadow:NO];
37 }
38 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698