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

Unified Diff: chrome/browser/instant/instant_loader.h

Issue 5073002: Modifies the Instant loader to listen for RENDER_VIEW_HOST_CHANGED notificati... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_loader.h
===================================================================
--- chrome/browser/instant/instant_loader.h (revision 66159)
+++ chrome/browser/instant/instant_loader.h (working copy)
@@ -12,6 +12,8 @@
#include "base/timer.h"
#include "chrome/browser/instant/instant_commit_type.h"
#include "chrome/browser/search_engines/template_url_id.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.h"
#include "chrome/common/page_transition_types.h"
#include "gfx/rect.h"
#include "googleurl/src/gurl.h"
@@ -31,10 +33,10 @@
//
// If the TemplateURLID supplied to the constructor is zero, then the url is
// loaded as is.
-class InstantLoader {
+class InstantLoader : public NotificationObserver {
public:
InstantLoader(InstantLoaderDelegate* delegate, TemplateURLID id);
- ~InstantLoader();
+ virtual ~InstantLoader();
// Invoked to load a URL. |tab_contents| is the TabContents the preview is
// going to be shown on top of and potentially replace.
@@ -67,6 +69,10 @@
// intended to be invoked from InstantLoaderDoesntSupportInstant.
void ClearTemplateURLID();
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
// The preview TabContents; may be null.
TabContents* preview_contents() const { return preview_contents_.get(); }
@@ -164,6 +170,9 @@
// Timer used to update the bounds of the omnibox.
base::OneShotTimer<InstantLoader> update_bounds_timer_;
+ // Used to get notifications about renderers coming and going.
+ NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(InstantLoader);
};
« no previous file with comments | « no previous file | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698