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

Unified Diff: chrome/browser/instant/instant_overlay_controller.cc

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/instant/instant_overlay_controller.cc
diff --git a/chrome/browser/instant/instant_overlay_controller.cc b/chrome/browser/instant/instant_overlay_controller.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b0b88181e031de49058bb6a63b66d1e6728b8513
--- /dev/null
+++ b/chrome/browser/instant/instant_overlay_controller.cc
@@ -0,0 +1,20 @@
+// 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/instant/instant_overlay_controller.h"
+
+#include "chrome/browser/instant/instant_controller.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_instant_controller.h"
+
+InstantOverlayController::InstantOverlayController(Browser* browser)
+ : browser_(browser) {
+ if (browser_->instant_controller())
+ browser_->instant_controller()->instant()->AddModelObserver(this);
+}
+
+InstantOverlayController::~InstantOverlayController() {
+ if (browser_->instant_controller())
+ browser_->instant_controller()->instant()->RemoveModelObserver(this);
+}

Powered by Google App Engine
This is Rietveld 408576698