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

Side by Side Diff: chrome/browser/instant/instant_model.cc

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/instant/instant_model.h" 5 #include "chrome/browser/instant/instant_model.h"
6 6
7 #include "chrome/browser/instant/instant_controller.h" 7 #include "chrome/browser/instant/instant_controller.h"
8 #include "chrome/browser/instant/instant_model_observer.h" 8 #include "chrome/browser/instant/instant_model_observer.h"
9 9
10 InstantModel::InstantModel(InstantController* controller) 10 InstantModel::InstantModel(InstantController* controller)
(...skipping 20 matching lines...) Expand all
31 31
32 DVLOG(1) << "SetPreviewState: " << mode_.mode << " to " << mode.mode; 32 DVLOG(1) << "SetPreviewState: " << mode_.mode << " to " << mode.mode;
33 mode_ = mode; 33 mode_ = mode;
34 height_ = height; 34 height_ = height;
35 height_units_ = height_units; 35 height_units_ = height_units;
36 36
37 FOR_EACH_OBSERVER(InstantModelObserver, observers_, 37 FOR_EACH_OBSERVER(InstantModelObserver, observers_,
38 PreviewStateChanged(*this)); 38 PreviewStateChanged(*this));
39 } 39 }
40 40
41 void InstantModel::SetPreviewContents(TabContents* preview_contents) { 41 void InstantModel::SetPreviewContents(content::WebContents* preview_contents) {
42 if (preview_contents_ == preview_contents) 42 if (preview_contents_ == preview_contents)
43 return; 43 return;
44 44
45 preview_contents_ = preview_contents; 45 preview_contents_ = preview_contents;
46 46
47 FOR_EACH_OBSERVER(InstantModelObserver, observers_, 47 FOR_EACH_OBSERVER(InstantModelObserver, observers_,
48 PreviewStateChanged(*this)); 48 PreviewStateChanged(*this));
49 } 49 }
50 50
51 TabContents* InstantModel::GetPreviewContents() const { 51 content::WebContents* InstantModel::GetPreviewContents() const {
52 return controller_->GetPreviewContents(); 52 return controller_->GetPreviewContents();
53 } 53 }
54 54
55 void InstantModel::AddObserver(InstantModelObserver* observer) const { 55 void InstantModel::AddObserver(InstantModelObserver* observer) const {
56 observers_.AddObserver(observer); 56 observers_.AddObserver(observer);
57 } 57 }
58 58
59 void InstantModel::RemoveObserver(InstantModelObserver* observer) const { 59 void InstantModel::RemoveObserver(InstantModelObserver* observer) const {
60 observers_.RemoveObserver(observer); 60 observers_.RemoveObserver(observer);
61 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698