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

Unified Diff: content/browser/webui/web_ui_impl.h

Issue 10154004: re-use WebUIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WeakPtr solution Created 8 years, 8 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 | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/webui/web_ui_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui_impl.h
diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h
index df245c7bd1f8a26da0207478d3886a6b2142b033..d0dfcabc427927a8de4c77371f1c09492882b464 100644
--- a/content/browser/webui/web_ui_impl.h
+++ b/content/browser/webui/web_ui_impl.h
@@ -7,9 +7,9 @@
#pragma once
#include <map>
-#include <set>
#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_ui.h"
#include "ipc/ipc_channel.h"
@@ -18,7 +18,8 @@ class RenderViewHost;
}
class CONTENT_EXPORT WebUIImpl : public content::WebUI,
- public IPC::Channel::Listener {
+ public IPC::Channel::Listener,
+ public base::SupportsWeakPtr<WebUIImpl> {
public:
explicit WebUIImpl(content::WebContents* contents);
virtual ~WebUIImpl();
@@ -28,15 +29,6 @@ class CONTENT_EXPORT WebUIImpl : public content::WebUI,
// RenderViewHostManager will reuse RenderView instances.
void RenderViewCreated(content::RenderViewHost* render_view_host);
- // Called when the document element is available for the page. |main_frame|
- // is true if the main frame's document is the one that's ready; otherwise
- // the frame is an iframe and |source_url| gives its URL. The WebUI ignores
- // messages until the document is available, because otherwise when we reuse
- // a RenderView, we can receive and attempt to handle WebUISend messages from
- // the prior navigation, which were in-flight when the RenderView got
- // repurposed.
- void DocumentAvailableInFrame(const GURL& source_url);
-
// WebUI implementation:
virtual content::WebContents* GetWebContents() const OVERRIDE;
virtual content::WebUIController* GetController() const OVERRIDE;
@@ -119,11 +111,6 @@ class CONTENT_EXPORT WebUIImpl : public content::WebUI,
// iframe).
std::string frame_xpath_;
- // List of URL origins in the renderer for which the document is ready. Each
- // origin identifies a frame; two frames with the same origin may cause this
- // to break.
- std::set<GURL> document_available_origins_;
-
scoped_ptr<content::WebUIController> controller_;
DISALLOW_COPY_AND_ASSIGN(WebUIImpl);
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/webui/web_ui_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698