summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/mock_render_thread.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-26 18:45:21 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-26 18:45:21 +0000
commit2a521c50ab1cb527625a69f3130a421a01f84621 (patch)
tree68153622a64534e8400c122575ab4232b6de2725 /chrome/renderer/mock_render_thread.h
parent43792ceca73af6e06c079db4f034b28a4402989d (diff)
downloadchromium_src-2a521c50ab1cb527625a69f3130a421a01f84621.zip
chromium_src-2a521c50ab1cb527625a69f3130a421a01f84621.tar.gz
chromium_src-2a521c50ab1cb527625a69f3130a421a01f84621.tar.bz2
Refactor away all the duplicate extension data structures in
renderer processes by sending the full extension object instead. ExtensionRendererInfo remains, but it is now just a convenience wrapper around a map of Extension objects. This allows us to reuse all the helper methods on Extension, ExtensionIconSet, ExtensionExtent, etc without duplicating them in the renderer. Also changed broadcasts to renderers to send only changed information, not entire set of extension data again. BUG=70516 Review URL: http://codereview.chromium.org/6242010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72654 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/mock_render_thread.h')
-rw-r--r--chrome/renderer/mock_render_thread.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/renderer/mock_render_thread.h b/chrome/renderer/mock_render_thread.h
index e127184..551f77a 100644
--- a/chrome/renderer/mock_render_thread.h
+++ b/chrome/renderer/mock_render_thread.h
@@ -8,6 +8,7 @@
#include <string>
+#include "chrome/renderer/extensions/extension_renderer_info.h"
#include "chrome/renderer/mock_printer.h"
#include "chrome/renderer/render_thread.h"
#include "ipc/ipc_test_sink.h"
@@ -30,6 +31,8 @@ class MockRenderThread : public RenderThreadBase {
MockRenderThread();
virtual ~MockRenderThread();
+ virtual const ExtensionRendererInfo* GetExtensions() const;
+
// Provides access to the messages that have been received by this thread.
IPC::TestSink& sink() { return sink_; }
@@ -139,6 +142,10 @@ class MockRenderThread : public RenderThreadBase {
// A mock printer device used for printing tests.
scoped_ptr<MockPrinter> printer_;
+ // Contains extensions currently loaded by browser. This is usually empty
+ // for MockRenderThread.
+ ExtensionRendererInfo extensions_;
+
bool is_extension_process_;
};