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

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

Issue 11421079: Persist the Instant API to committed search result pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 8 years 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 | Annotate | Revision Log
OLDNEW
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/cocoa/tab_contents/instant_preview_controller_mac.h" 5 #include "chrome/browser/ui/cocoa/tab_contents/instant_preview_controller_mac.h"
6 6
7 #include "chrome/browser/instant/instant_model.h" 7 #include "chrome/browser/instant/instant_model.h"
8 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 8 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
9 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h" 9 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents.h"
11 10
12 InstantPreviewControllerMac::InstantPreviewControllerMac( 11 InstantPreviewControllerMac::InstantPreviewControllerMac(
13 Browser* browser, 12 Browser* browser,
14 BrowserWindowController* window, 13 BrowserWindowController* window,
15 PreviewableContentsController* preview) 14 PreviewableContentsController* preview)
16 : InstantPreviewController(browser), 15 : InstantPreviewController(browser),
17 window_(window), 16 window_(window),
18 preview_(preview) { 17 preview_(preview) {
19 } 18 }
20 19
21 InstantPreviewControllerMac::~InstantPreviewControllerMac() { 20 InstantPreviewControllerMac::~InstantPreviewControllerMac() {
22 } 21 }
23 22
24 void InstantPreviewControllerMac::PreviewStateChanged( 23 void InstantPreviewControllerMac::PreviewStateChanged(
25 const InstantModel& model) { 24 const InstantModel& model) {
26 if (model.mode().is_search_suggestions()) { 25 if (model.mode().is_search_suggestions()) {
27 // TODO(dhollowa): Needs height and units implementation on Mac. 26 // TODO(dhollowa): Needs height and units implementation on Mac.
28 [preview_ showPreview:model.GetPreviewContents()->web_contents()]; 27 [preview_ showPreview:model.GetPreviewContents()];
29 } else { 28 } else {
30 [preview_ hidePreview]; 29 [preview_ hidePreview];
31 } 30 }
32 [window_ updateBookmarkBarVisibilityWithAnimation:NO]; 31 [window_ updateBookmarkBarVisibilityWithAnimation:NO];
33 } 32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698