From 2a521c50ab1cb527625a69f3130a421a01f84621 Mon Sep 17 00:00:00 2001 From: "aa@chromium.org" Date: Wed, 26 Jan 2011 18:45:21 +0000 Subject: 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 --- chrome/renderer/mock_render_thread.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'chrome/renderer/mock_render_thread.h') 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 +#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 printer_; + // Contains extensions currently loaded by browser. This is usually empty + // for MockRenderThread. + ExtensionRendererInfo extensions_; + bool is_extension_process_; }; -- cgit v1.1