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

Unified Diff: content/public/browser/web_ui_controller.h

Issue 9224002: Make WebUI objects not derive from WebUI. WebUI objects own the controller. This is the ownership... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to head to clear linux_chromeos browsertest failures Created 8 years, 11 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/public/browser/web_ui_controller.h
===================================================================
--- content/public/browser/web_ui_controller.h (revision 117871)
+++ content/public/browser/web_ui_controller.h (working copy)
@@ -12,6 +12,7 @@
class GURL;
class RenderViewHost;
+class WebUI;
namespace base {
class ListValue;
@@ -23,6 +24,7 @@
// manages the data source and message handlers.
class CONTENT_EXPORT WebUIController {
public:
+ explicit WebUIController(WebUI* web_ui) : web_ui_(web_ui) {}
virtual ~WebUIController() {}
// Allows the controller to override handling all messages from the page.
@@ -49,6 +51,12 @@
// within the same page), and if so trigger that code manually since onload
// won't be run in that case.
virtual void DidBecomeActiveForReusedRenderView() {}
+
+ WebUI* web_ui() const { return web_ui_; }
+
+ private:
+ WebUI* web_ui_;
+
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698