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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 11028019: Browser plugin: Implement loadRedirect event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch Created 8 years, 2 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: content/browser/browser_plugin/browser_plugin_guest.h
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index bfef213c7c8b1eb69706a526174cb929ac459d5d..d86a0d05da06773d39970455172becc80b68863c 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -34,6 +34,8 @@
#include "base/compiler_specific.h"
#include "base/id_map.h"
#include "base/time.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/gfx/rect.h"
@@ -57,7 +59,8 @@ class RenderProcessHost;
// messages.
//
// BrowserPluginEmbedder is responsible for creating and destroying a guest.
-class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate,
+class CONTENT_EXPORT BrowserPluginGuest : public NotificationObserver,
+ public WebContentsDelegate,
public WebContentsObserver {
public:
virtual ~BrowserPluginGuest();
@@ -81,6 +84,11 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate,
embedder_render_process_host_ = render_process_host;
}
+ // NotificationObserver implementation.
+ virtual void Observe(int type,
+ const NotificationSource& source,
+ const NotificationDetails& details) OVERRIDE;
+
// WebContentsObserver implementation.
virtual void DidCommitProvisionalLoadForFrame(
int64 frame_id,
@@ -161,9 +169,15 @@ class CONTENT_EXPORT BrowserPluginGuest : public WebContentsDelegate,
// since we want to intercept certain messages for testing.
virtual void SendMessageToEmbedder(IPC::Message* msg);
+ // Called when a redirect notification occurs.
+ void LoadRedirect(const GURL& old_url,
+ const GURL& new_url,
+ bool is_top_level);
+
// Static factory instance (always NULL for non-test).
static content::BrowserPluginHostFactory* factory_;
+ NotificationRegistrar notification_registrar_;
RenderProcessHost* embedder_render_process_host_;
// An identifier that uniquely identifies a browser plugin guest within an
// embedder.

Powered by Google App Engine
This is Rietveld 408576698