| Index: chrome/browser/instant/instant_overlay_model.h
|
| diff --git a/chrome/browser/instant/instant_overlay_model.h b/chrome/browser/instant/instant_overlay_model.h
|
| index d8203be35cd22e594d6089ca80d77d13e8d2cca6..d002e9e8626bcd9711a0af16f4b25680fe72c950 100644
|
| --- a/chrome/browser/instant/instant_overlay_model.h
|
| +++ b/chrome/browser/instant/instant_overlay_model.h
|
| @@ -8,10 +8,9 @@
|
| #include "base/basictypes.h"
|
| #include "base/observer_list.h"
|
| #include "chrome/common/instant_types.h"
|
| -#include "chrome/common/search_types.h"
|
|
|
| -class InstantController;
|
| class InstantOverlayModelObserver;
|
| +class InstantService;
|
|
|
| namespace content {
|
| class WebContents;
|
| @@ -21,43 +20,31 @@ class WebContents;
|
| // layout of the Instant overlay.
|
| class InstantOverlayModel {
|
| public:
|
| - explicit InstantOverlayModel(InstantController* controller);
|
| + explicit InstantOverlayModel(InstantService* service);
|
| ~InstantOverlayModel();
|
|
|
| - // InstantOverlayModel only uses Mode::mode internally. Other parts of Mode,
|
| - // such as Mode::origin, may have arbitrary values, and should be ignored.
|
| - const chrome::search::Mode& mode() const { return mode_; }
|
| + content::WebContents* contents() const { return contents_; }
|
| int height() const { return height_; }
|
| InstantSizeUnits height_units() const { return height_units_; }
|
|
|
| - void SetOverlayState(const chrome::search::Mode& mode,
|
| + void SetOverlayState(content::WebContents* contents,
|
| int height,
|
| InstantSizeUnits height_units);
|
|
|
| - void SetOverlayContents(content::WebContents* overlay_contents);
|
| - content::WebContents* GetOverlayContents() const;
|
| -
|
| // Add and remove observers.
|
| void AddObserver(InstantOverlayModelObserver* observer);
|
| void RemoveObserver(InstantOverlayModelObserver* observer);
|
|
|
| private:
|
| - chrome::search::Mode mode_;
|
| + content::WebContents* contents_;
|
| int height_;
|
| InstantSizeUnits height_units_;
|
|
|
| - // Weak. Remembers the last set overlay contents to detect changes. Actual
|
| - // overlay contents is fetched from the |controller_| as this may not always
|
| - // reflect the actual overlay in effect.
|
| - content::WebContents* overlay_contents_;
|
| -
|
| - // Weak. The controller currently holds some model state.
|
| - // TODO(dhollowa): Remove this, transfer all state to InstantOverlayModel.
|
| - InstantController* const controller_;
|
| -
|
| // Observers.
|
| ObserverList<InstantOverlayModelObserver> observers_;
|
|
|
| + InstantService* const service_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(InstantOverlayModel);
|
| };
|
|
|
|
|