| OLD | NEW |
| 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_overlay_controller.h" | 5 #include "chrome/browser/instant/instant_overlay_controller.h" |
| 6 | 6 |
| 7 #include "chrome/browser/instant/instant_controller.h" |
| 7 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/browser_instant_controller.h" | 9 #include "chrome/browser/ui/browser_instant_controller.h" |
| 9 | 10 |
| 10 InstantOverlayController::InstantOverlayController(Browser* browser) | 11 InstantOverlayController::InstantOverlayController(Browser* browser) |
| 11 : browser_(browser) { | 12 : browser_(browser) { |
| 12 if (browser_->instant_controller()) | 13 if (browser_->instant_controller()) |
| 13 browser_->instant_controller()->instant()->model()->AddObserver(this); | 14 browser_->instant_controller()->instant()->AddOverlayModelObserver(this); |
| 14 } | 15 } |
| 15 | 16 |
| 16 InstantOverlayController::~InstantOverlayController() { | 17 InstantOverlayController::~InstantOverlayController() { |
| 17 if (browser_->instant_controller()) | 18 if (browser_->instant_controller()) |
| 18 browser_->instant_controller()->instant()->model()->RemoveObserver(this); | 19 browser_->instant_controller()->instant()->RemoveOverlayModelObserver(this); |
| 19 } | 20 } |
| OLD | NEW |