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

Unified Diff: chrome/browser/renderer_host/render_view_host_factory.h

Issue 6532073: Move core pieces of browser\renderer_host to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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: chrome/browser/renderer_host/render_view_host_factory.h
===================================================================
--- chrome/browser/renderer_host/render_view_host_factory.h (revision 75488)
+++ chrome/browser/renderer_host/render_view_host_factory.h (working copy)
@@ -6,63 +6,7 @@
#define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_FACTORY_H_
#pragma once
-#include "base/basictypes.h"
+// TODO(jam): remove this file when all files have been converted.
+#include "content/browser/renderer_host/render_view_host_factory.h"
-class RenderViewHost;
-class RenderViewHostDelegate;
-class SessionStorageNamespace;
-class SiteInstance;
-
-namespace base {
-class WaitableEvent;
-} // namespace base
-
-// A factory for creating RenderViewHosts. There is a global factory function
-// that can be installed for the purposes of testing to provide a specialized
-// RenderViewHost class.
-class RenderViewHostFactory {
- public:
- // Creates a RenderViewHost using the currently registered factory, or the
- // default one if no factory is registered. Ownership of the returned
- // pointer will be passed to the caller.
- static RenderViewHost* Create(SiteInstance* instance,
- RenderViewHostDelegate* delegate,
- int routing_id,
- SessionStorageNamespace* session_storage);
-
- // Returns true if there is currently a globally-registered factory.
- static bool has_factory() {
- return !!factory_;
- }
-
- protected:
- RenderViewHostFactory() {}
- virtual ~RenderViewHostFactory() {}
-
- // You can derive from this class and specify an implementation for this
- // function to create a different kind of RenderViewHost for testing.
- virtual RenderViewHost* CreateRenderViewHost(
- SiteInstance* instance,
- RenderViewHostDelegate* delegate,
- int routing_id,
- SessionStorageNamespace* session_storage_namespace) = 0;
-
- // Registers your factory to be called when new RenderViewHosts are created.
- // We have only one global factory, so there must be no factory registered
- // before the call. This class does NOT take ownership of the pointer.
- static void RegisterFactory(RenderViewHostFactory* factory);
-
- // Unregister the previously registered factory. With no factory registered,
- // the default RenderViewHosts will be created.
- static void UnregisterFactory();
-
- private:
- // The current globally registered factory. This is NULL when we should
- // create the default RenderViewHosts.
- static RenderViewHostFactory* factory_;
-
- DISALLOW_COPY_AND_ASSIGN(RenderViewHostFactory);
-};
-
-
#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698