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

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: Fix merge conflicts. 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
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2a65623c5f19bd2c3c526c4177c6baabfbd4d045..0b2db0e77f5f5a4c86f267454af8b51ffb4489a1 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 DidStartProvisionalLoadForFrame(
int64 frame_id,
@@ -180,9 +188,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.
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698