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

Unified Diff: chrome/browser/ui/search/instant_overlay_model.cc

Issue 22694002: InstantExtended: Nuke InstantOverlayController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/search/instant_overlay_model.cc
diff --git a/chrome/browser/ui/search/instant_overlay_model.cc b/chrome/browser/ui/search/instant_overlay_model.cc
deleted file mode 100644
index bc6213b77ce5392492ef413a90671d6a28ffc920..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/search/instant_overlay_model.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/search/instant_overlay_model.h"
-
-#include "chrome/browser/ui/search/instant_controller.h"
-#include "chrome/browser/ui/search/instant_overlay_model_observer.h"
-
-InstantOverlayModel::InstantOverlayModel(InstantController* controller)
- : height_(0),
- height_units_(INSTANT_SIZE_PIXELS),
- overlay_contents_(NULL),
- controller_(controller) {
-}
-
-InstantOverlayModel::~InstantOverlayModel() {
-}
-
-void InstantOverlayModel::SetOverlayState(const SearchMode& mode,
- int height,
- InstantSizeUnits height_units) {
- if (mode_.mode == mode.mode && height_ == height &&
- height_units_ == height_units) {
- // Mode::mode hasn't changed, but perhaps bits that we ignore (such as
- // Mode::origin) have. Update |mode_| anyway, so it's consistent with the
- // argument (so mode() doesn't return something unexpected).
- mode_ = mode;
- return;
- }
-
- DVLOG(1) << "SetOverlayState: " << mode_.mode << " to " << mode.mode;
- mode_ = mode;
- height_ = height;
- height_units_ = height_units;
-
- FOR_EACH_OBSERVER(InstantOverlayModelObserver, observers_,
- OverlayStateChanged(*this));
-}
-
-void InstantOverlayModel::SetOverlayContents(
- content::WebContents* overlay_contents) {
- if (overlay_contents_ == overlay_contents)
- return;
-
- overlay_contents_ = overlay_contents;
-
- FOR_EACH_OBSERVER(InstantOverlayModelObserver, observers_,
- OverlayStateChanged(*this));
-}
-
-content::WebContents* InstantOverlayModel::GetOverlayContents() const {
- return overlay_contents_;
-}
-
-void InstantOverlayModel::AddObserver(InstantOverlayModelObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void InstantOverlayModel::RemoveObserver(
- InstantOverlayModelObserver* observer) {
- observers_.RemoveObserver(observer);
-}
« no previous file with comments | « chrome/browser/ui/search/instant_overlay_model.h ('k') | chrome/browser/ui/search/instant_overlay_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698