diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 17:26:27 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 17:26:27 +0000 |
commit | 380244096d42210d8fff26b7e3a1b601599db61a (patch) | |
tree | 4d11d03f4c0a51ffabca8f9b27114be9d7a4ca3d | |
parent | f07ff018676f0304c5fe099284e726ca0deb18e2 (diff) | |
download | chromium_src-380244096d42210d8fff26b7e3a1b601599db61a.zip chromium_src-380244096d42210d8fff26b7e3a1b601599db61a.tar.gz chromium_src-380244096d42210d8fff26b7e3a1b601599db61a.tar.bz2 |
Cleanup usage of RenderThread for code that runs under tests. Before RenderThread::current() couldn't be used since it didn't exist in tests. The new API version, content::RenderThread::Get() works in tests, so this code isn't necessary anymore.
BUG=98375
Review URL: http://codereview.chromium.org/8194001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104505 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/extensions/chrome_v8_context_set.cc | 13 | ||||
-rw-r--r-- | chrome/renderer/extensions/chrome_v8_context_set.h | 8 | ||||
-rw-r--r-- | chrome/renderer/extensions/chrome_v8_context_set_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/extensions/event_bindings.cc | 17 | ||||
-rw-r--r-- | chrome/renderer/extensions/event_bindings.h | 5 | ||||
-rw-r--r-- | chrome/renderer/extensions/renderer_extension_bindings.cc | 4 | ||||
-rw-r--r-- | chrome/test/base/render_view_test.cc | 8 | ||||
-rw-r--r-- | content/renderer/render_thread_impl.cc | 1 | ||||
-rw-r--r-- | content/renderer/render_view.cc | 29 | ||||
-rw-r--r-- | content/renderer/render_view.h | 5 | ||||
-rw-r--r-- | content/renderer/render_widget.cc | 23 | ||||
-rw-r--r-- | content/renderer/render_widget.h | 15 | ||||
-rw-r--r-- | content/renderer/render_widget_fullscreen.cc | 10 | ||||
-rw-r--r-- | content/renderer/render_widget_fullscreen.h | 9 | ||||
-rw-r--r-- | content/renderer/render_widget_fullscreen_pepper.cc | 8 | ||||
-rw-r--r-- | content/renderer/render_widget_fullscreen_pepper.h | 4 |
16 files changed, 41 insertions, 120 deletions
diff --git a/chrome/renderer/extensions/chrome_v8_context_set.cc b/chrome/renderer/extensions/chrome_v8_context_set.cc index 955f150..a4f4bd6 100644 --- a/chrome/renderer/extensions/chrome_v8_context_set.cc +++ b/chrome/renderer/extensions/chrome_v8_context_set.cc @@ -45,14 +45,6 @@ bool HasSufficientPermissions(RenderView* render_view, const GURL& event_url) { } -// static -MessageLoop* ChromeV8ContextSet::delete_loop_ = NULL; - -// static -void ChromeV8ContextSet::SetDeleteLoop(MessageLoop* delete_loop) { - delete_loop_ = delete_loop; -} - ChromeV8ContextSet::ChromeV8ContextSet() { } ChromeV8ContextSet::~ChromeV8ContextSet() { @@ -79,10 +71,7 @@ void ChromeV8ContextSet::Add(ChromeV8Context* context) { void ChromeV8ContextSet::Remove(ChromeV8Context* context) { if (contexts_.erase(context)) { context->clear_web_frame(); - MessageLoop* loop = delete_loop_ ? - delete_loop_ : - RenderThread::Get()->GetMessageLoop(); - loop->DeleteSoon(FROM_HERE, context); + MessageLoop::current()->DeleteSoon(FROM_HERE, context); } } diff --git a/chrome/renderer/extensions/chrome_v8_context_set.h b/chrome/renderer/extensions/chrome_v8_context_set.h index 6b4a05b4..4d27a3d 100644 --- a/chrome/renderer/extensions/chrome_v8_context_set.h +++ b/chrome/renderer/extensions/chrome_v8_context_set.h @@ -14,7 +14,6 @@ class ChromeV8Context; class GURL; -class MessageLoop; class RenderView; namespace base { @@ -34,9 +33,6 @@ class Context; // extensions. class ChromeV8ContextSet { public: - // For testing. - static void SetDeleteLoop(MessageLoop* message_loop); - ChromeV8ContextSet(); ~ChromeV8ContextSet(); @@ -75,10 +71,6 @@ class ChromeV8ContextSet { const GURL& event_url) const; private: - // The loop we will delete ChromeV8Context on. If NULL, we use - // RenderThread's loop instead. - static MessageLoop* delete_loop_; - ContextSet contexts_; DISALLOW_COPY_AND_ASSIGN(ChromeV8ContextSet); diff --git a/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc b/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc index 786a6af..b7305df 100644 --- a/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc +++ b/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc @@ -11,7 +11,6 @@ TEST(ChromeV8ContextSet, Lifecycle) { MessageLoop loop; - ChromeV8ContextSet::SetDeleteLoop(&loop); ChromeV8ContextSet context_set; @@ -48,7 +47,6 @@ TEST(ChromeV8ContextSet, Lifecycle) { TEST(ChromeV8ContextSet, RemoveByV8Context) { MessageLoop loop; - ChromeV8ContextSet::SetDeleteLoop(&loop); ChromeV8ContextSet context_set; diff --git a/chrome/renderer/extensions/event_bindings.cc b/chrome/renderer/extensions/event_bindings.cc index 03cc664..194020a 100644 --- a/chrome/renderer/extensions/event_bindings.cc +++ b/chrome/renderer/extensions/event_bindings.cc @@ -38,9 +38,6 @@ using content::RenderThread; namespace { -// Keep a local cache of RenderThread so that we can mock it out for unit tests. -static RenderThread* render_thread = NULL; - // A map of event names to the number of listeners for that event. We notify // the browser about event listeners when we transition between 0 and 1. typedef std::map<std::string, int> EventListenerCounts; @@ -98,7 +95,7 @@ class ExtensionImpl : public ChromeV8Extension { return v8::Undefined(); if (++listener_counts[event_name] == 1) { - EventBindings::GetRenderThread()->Send( + content::RenderThread::Get()->Send( new ExtensionHostMsg_AddListener(context->extension_id(), event_name)); } @@ -124,7 +121,7 @@ class ExtensionImpl : public ChromeV8Extension { GetListenerCounts(context->extension_id()); std::string event_name(*v8::String::AsciiValue(args[0])); if (--listener_counts[event_name] == 0) { - EventBindings::GetRenderThread()->Send( + content::RenderThread::Get()->Send( new ExtensionHostMsg_RemoveListener(context->extension_id(), event_name)); } @@ -172,13 +169,3 @@ v8::Extension* EventBindings::Get(ExtensionDispatcher* dispatcher) { static v8::Extension* extension = new ExtensionImpl(dispatcher); return extension; } - -// static -void EventBindings::SetRenderThread(RenderThread* thread) { - render_thread = thread; -} - -// static -RenderThread* EventBindings::GetRenderThread() { - return render_thread ? render_thread : RenderThread::Get(); -} diff --git a/chrome/renderer/extensions/event_bindings.h b/chrome/renderer/extensions/event_bindings.h index b983684..5b05b2e 100644 --- a/chrome/renderer/extensions/event_bindings.h +++ b/chrome/renderer/extensions/event_bindings.h @@ -20,11 +20,6 @@ class Extension; class EventBindings { public: static v8::Extension* Get(ExtensionDispatcher* dispatcher); - - // Allow RenderThread to be mocked out. It would be better if - // RenderView::current() worked inside tests. See crbug.com/98375. - static void SetRenderThread(content::RenderThread* thread); - static content::RenderThread* GetRenderThread(); }; #endif // CHROME_RENDERER_EXTENSIONS_EVENT_BINDINGS_H_ diff --git a/chrome/renderer/extensions/renderer_extension_bindings.cc b/chrome/renderer/extensions/renderer_extension_bindings.cc index 0571c77..2c250a2 100644 --- a/chrome/renderer/extensions/renderer_extension_bindings.cc +++ b/chrome/renderer/extensions/renderer_extension_bindings.cc @@ -144,7 +144,7 @@ class ExtensionImpl : public ChromeV8Extension { // Send via the RenderThread because the RenderView might be closing. bool notify_browser = args[1]->BooleanValue(); if (notify_browser) - EventBindings::GetRenderThread()->Send( + content::RenderThread::Get()->Send( new ExtensionHostMsg_CloseChannel(port_id)); ClearPortData(port_id); } @@ -169,7 +169,7 @@ class ExtensionImpl : public ChromeV8Extension { int port_id = args[0]->Int32Value(); if (HasPortData(port_id) && --GetPortData(port_id).ref_count == 0) { // Send via the RenderThread because the RenderView might be closing. - EventBindings::GetRenderThread()->Send( + content::RenderThread::Get()->Send( new ExtensionHostMsg_CloseChannel(port_id)); ClearPortData(port_id); } diff --git a/chrome/test/base/render_view_test.cc b/chrome/test/base/render_view_test.cc index f19511f..efc05a8 100644 --- a/chrome/test/base/render_view_test.cc +++ b/chrome/test/base/render_view_test.cc @@ -122,16 +122,12 @@ void RenderViewTest::SetUp() { WebScriptController::registerExtension(new ChromeV8Extension( "extensions/apitest.js", IDR_EXTENSION_APITEST_JS, NULL)); - EventBindings::SetRenderThread(&render_thread_); - ChromeV8ContextSet::SetDeleteLoop(&msg_loop_); - mock_process_.reset(new MockRenderProcess); render_thread_.set_routing_id(kRouteId); // This needs to pass the mock render thread to the view. - view_ = RenderView::Create(&render_thread_, - 0, + view_ = RenderView::Create(0, kOpenerId, RendererPreferences(), WebPreferences(), @@ -160,8 +156,6 @@ void RenderViewTest::TearDown() { // Run the loop so the release task from the renderwidget executes. ProcessPendingMessages(); - EventBindings::SetRenderThread(NULL); - view_ = NULL; mock_process_.reset(); diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index adfaa5a..556ffaa 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -675,7 +675,6 @@ void RenderThreadImpl::OnCreateNewView(const ViewMsg_New_Params& params) { EnsureWebKitInitialized(); // When bringing in render_view, also bring in webkit's glue and jsbindings. RenderView::Create( - this, params.parent_window, MSG_ROUTING_NONE, params.renderer_preferences, diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc index d93a9f4..b5549df 100644 --- a/content/renderer/render_view.cc +++ b/content/renderer/render_view.cc @@ -238,6 +238,7 @@ using appcache::WebApplicationCacheHostImpl; using base::Time; using base::TimeDelta; using content::NavigationState; +using content::RenderThread; using content::RenderViewObserver; using content::RenderViewVisitor; using content::V8ValueConverter; @@ -300,8 +301,7 @@ struct RenderView::PendingFileChooser { WebFileChooserCompletion* completion; // MAY BE NULL to skip callback. }; -RenderView::RenderView(content::RenderThread* render_thread, - gfx::NativeViewId parent_hwnd, +RenderView::RenderView(gfx::NativeViewId parent_hwnd, int32 opener_id, const RendererPreferences& renderer_prefs, const WebPreferences& webkit_prefs, @@ -309,7 +309,7 @@ RenderView::RenderView(content::RenderThread* render_thread, int32 routing_id, int64 session_storage_namespace_id, const string16& frame_name) - : RenderWidget(render_thread, WebKit::WebPopupTypeNone), + : RenderWidget(WebKit::WebPopupTypeNone), webkit_preferences_(webkit_prefs), send_content_state_immediately_(false), enabled_bindings_(0), @@ -358,7 +358,7 @@ RenderView::RenderView(content::RenderThread* render_thread, intents_dispatcher_ = new IntentsDispatcher(this); notification_provider_ = new NotificationProvider(this); - render_thread_->AddRoute(routing_id_, this); + RenderThread::Get()->AddRoute(routing_id_, this); // Take a reference on behalf of the RenderThread. This will be balanced // when we receive ViewMsg_ClosePage. AddRef(); @@ -459,7 +459,6 @@ RenderView* RenderView::FromWebView(WebView* webview) { /*static*/ RenderView* RenderView::Create( - content::RenderThread* render_thread, gfx::NativeViewId parent_hwnd, int32 opener_id, const RendererPreferences& renderer_prefs, @@ -470,7 +469,6 @@ RenderView* RenderView::Create( const string16& frame_name) { DCHECK(routing_id != MSG_ROUTING_NONE); return new RenderView( - render_thread, parent_hwnd, opener_id, renderer_prefs, @@ -949,7 +947,7 @@ void RenderView::OnCopyToFindPboard() { WebFrame* frame = webview()->focusedFrame(); if (frame->hasSelection()) { string16 selection = frame->selectionAsText(); - render_thread_->Send( + RenderThread::Get()->Send( new ClipboardHostMsg_FindPboardWriteStringAsync(selection)); } } @@ -1335,15 +1333,14 @@ WebView* RenderView::createView( int64 cloned_session_storage_namespace_id; bool opener_suppressed = creator->willSuppressOpenerInNewFrame(); - render_thread_->Send( + RenderThread::Get()->Send( new ViewHostMsg_CreateWindow(params, &routing_id, &cloned_session_storage_namespace_id)); if (routing_id == MSG_ROUTING_NONE) return NULL; - RenderView* view = RenderView::Create(render_thread_, - 0, + RenderView* view = RenderView::Create(0, routing_id_, renderer_preferences_, webkit_preferences_, @@ -1370,9 +1367,7 @@ WebView* RenderView::createView( } WebWidget* RenderView::createPopupMenu(WebKit::WebPopupType popup_type) { - RenderWidget* widget = RenderWidget::Create(routing_id_, - render_thread_, - popup_type); + RenderWidget* widget = RenderWidget::Create(routing_id_, popup_type); return widget->webwidget(); } @@ -1399,7 +1394,7 @@ RenderWidgetFullscreenPepper* RenderView::CreatePepperFullscreenContainer( if (webview() && webview()->mainFrame()) active_url = GURL(webview()->mainFrame()->document().url()); RenderWidgetFullscreenPepper* widget = RenderWidgetFullscreenPepper::Create( - routing_id_, render_thread_, plugin, active_url); + routing_id_, plugin, active_url); widget->show(WebKit::WebNavigationPolicyIgnore); return widget; } @@ -2973,15 +2968,13 @@ webkit::npapi::WebPluginDelegate* RenderView::CreatePluginDelegate( void RenderView::CreatedPluginWindow(gfx::PluginWindowHandle window) { #if defined(USE_X11) - render_thread_->Send(new ViewHostMsg_CreatePluginContainer( - routing_id(), window)); + Send(new ViewHostMsg_CreatePluginContainer(routing_id(), window)); #endif } void RenderView::WillDestroyPluginWindow(gfx::PluginWindowHandle window) { #if defined(USE_X11) - render_thread_->Send(new ViewHostMsg_DestroyPluginContainer( - routing_id(), window)); + Send(new ViewHostMsg_DestroyPluginContainer(routing_id(), window)); #endif CleanupWindowInPluginMoves(window); } diff --git a/content/renderer/render_view.h b/content/renderer/render_view.h index 91d03ca..b1728b3 100644 --- a/content/renderer/render_view.h +++ b/content/renderer/render_view.h @@ -87,7 +87,6 @@ class WaitableEvent; namespace content { class NavigationState; class P2PSocketDispatcher; -class RenderThread; class RenderViewObserver; class RenderViewVisitor; } // namespace content @@ -180,7 +179,6 @@ class RenderView : public RenderWidget, // |counter| is either a currently initialized counter, or NULL (in which case // we treat this RenderView as a top level window). CONTENT_EXPORT static RenderView* Create( - content::RenderThread* render_thread, gfx::NativeViewId parent_hwnd, int32 opener_id, const RendererPreferences& renderer_prefs, @@ -698,8 +696,7 @@ class RenderView : public RenderWidget, CONNECTION_ERROR, }; - RenderView(content::RenderThread* render_thread, - gfx::NativeViewId parent_hwnd, + RenderView(gfx::NativeViewId parent_hwnd, int32 opener_id, const RendererPreferences& renderer_prefs, const WebPreferences& webkit_prefs, diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 871a476..68594e4 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -61,13 +61,12 @@ using WebKit::WebTextDirection; using WebKit::WebTouchEvent; using WebKit::WebVector; using WebKit::WebWidget; +using content::RenderThread; -RenderWidget::RenderWidget(content::RenderThread* render_thread, - WebKit::WebPopupType popup_type) +RenderWidget::RenderWidget(WebKit::WebPopupType popup_type) : routing_id_(MSG_ROUTING_NONE), webwidget_(NULL), opener_id_(MSG_ROUTING_NONE), - render_thread_(render_thread), host_window_(0), current_paint_buf_(NULL), next_paint_flags_(0), @@ -93,7 +92,7 @@ RenderWidget::RenderWidget(content::RenderThread* render_thread, animation_task_posted_(false), invalidation_task_posted_(false) { RenderProcess::current()->AddRefProcess(); - DCHECK(render_thread_); + DCHECK(RenderThread::Get()); has_disable_gpu_vsync_switch_ = CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableGpuVsync); } @@ -111,11 +110,9 @@ RenderWidget::~RenderWidget() { // static RenderWidget* RenderWidget::Create(int32 opener_id, - content::RenderThread* render_thread, WebKit::WebPopupType popup_type) { DCHECK(opener_id != MSG_ROUTING_NONE); - scoped_refptr<RenderWidget> widget(new RenderWidget(render_thread, - popup_type)); + scoped_refptr<RenderWidget> widget(new RenderWidget(popup_type)); widget->Init(opener_id); // adds reference return widget; } @@ -150,9 +147,9 @@ void RenderWidget::DoInit(int32 opener_id, webwidget_ = web_widget; - bool result = render_thread_->Send(create_widget_message); + bool result = RenderThread::Get()->Send(create_widget_message); if (result) { - render_thread_->AddRoute(routing_id_, this); + RenderThread::Get()->AddRoute(routing_id_, this); // Take a reference on behalf of the RenderThread. This will be balanced // when we receive ViewMsg_Close. AddRef(); @@ -225,7 +222,7 @@ bool RenderWidget::Send(IPC::Message* message) { if (message->routing_id() == MSG_ROUTING_NONE) message->set_routing_id(routing_id_); - return render_thread_->Send(message); + return RenderThread::Get()->Send(message); } // Got a response from the browser after the renderer decided to create a new @@ -244,7 +241,7 @@ void RenderWidget::OnClose() { // Browser correspondence is no longer needed at this point. if (routing_id_ != MSG_ROUTING_NONE) { - render_thread_->RemoveRoute(routing_id_); + RenderThread::Get()->RemoveRoute(routing_id_); SetHidden(false); } @@ -1267,9 +1264,9 @@ void RenderWidget::SetHidden(bool hidden) { // The status has changed. Tell the RenderThread about it. is_hidden_ = hidden; if (is_hidden_) - render_thread_->WidgetHidden(); + RenderThread::Get()->WidgetHidden(); else - render_thread_->WidgetRestored(); + RenderThread::Get()->WidgetRestored(); } void RenderWidget::SetBackground(const SkBitmap& background) { diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index fdd89ea..f4bed58 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h @@ -41,10 +41,6 @@ class WebWidget; struct WebPopupMenuInfo; } -namespace content { -class RenderThread; -} - namespace gfx { class Point; } @@ -72,11 +68,8 @@ class CONTENT_EXPORT RenderWidget public base::RefCounted<RenderWidget> { public: // Creates a new RenderWidget. The opener_id is the routing ID of the - // RenderView that this widget lives inside. The render_thread is any - // content::RenderThread implementation, mostly commonly - // RenderThread::current(). + // RenderView that this widget lives inside. static RenderWidget* Create(int32 opener_id, - content::RenderThread* render_thread, WebKit::WebPopupType popup_type); // Creates a WebWidget based on the popup type. @@ -148,8 +141,7 @@ class CONTENT_EXPORT RenderWidget // For unit tests. friend class RenderWidgetTest; - RenderWidget(content::RenderThread* render_thread, - WebKit::WebPopupType popup_type); + explicit RenderWidget(WebKit::WebPopupType popup_type); virtual ~RenderWidget(); // Initializes this view with the given opener. CompleteInit must be called @@ -339,9 +331,6 @@ class CONTENT_EXPORT RenderWidget // view is. int32 opener_id_; - // The thread that does our IPC. - content::RenderThread* render_thread_; - // The position where this view should be initially shown. gfx::Rect initial_pos_; diff --git a/content/renderer/render_widget_fullscreen.cc b/content/renderer/render_widget_fullscreen.cc index 7d651e1..1e38683 100644 --- a/content/renderer/render_widget_fullscreen.cc +++ b/content/renderer/render_widget_fullscreen.cc @@ -10,11 +10,10 @@ using WebKit::WebWidget; // static -RenderWidgetFullscreen* RenderWidgetFullscreen::Create( - int32 opener_id, content::RenderThread* render_thread) { +RenderWidgetFullscreen* RenderWidgetFullscreen::Create(int32 opener_id) { DCHECK_NE(MSG_ROUTING_NONE, opener_id); scoped_refptr<RenderWidgetFullscreen> widget( - new RenderWidgetFullscreen(render_thread)); + new RenderWidgetFullscreen()); widget->Init(opener_id); return widget.release(); } @@ -45,7 +44,6 @@ void RenderWidgetFullscreen::show(WebKit::WebNavigationPolicy) { } } -RenderWidgetFullscreen::RenderWidgetFullscreen( - content::RenderThread* render_thread) - : RenderWidget(render_thread, WebKit::WebPopupTypeNone) { +RenderWidgetFullscreen::RenderWidgetFullscreen() + : RenderWidget(WebKit::WebPopupTypeNone) { } diff --git a/content/renderer/render_widget_fullscreen.h b/content/renderer/render_widget_fullscreen.h index 1b2c382..bfb04f7 100644 --- a/content/renderer/render_widget_fullscreen.h +++ b/content/renderer/render_widget_fullscreen.h @@ -13,17 +13,14 @@ class RenderWidgetFullscreen : public RenderWidget { public: // Creates a new RenderWidget. The opener_id is the routing ID of the - // RenderView that this widget lives inside. The render_thread is any - // content::RenderThread implementation, mostly commonly - // RenderThread::current(). - static RenderWidgetFullscreen* Create(int32 opener_id, - content::RenderThread* render_thread); + // RenderView that this widget lives inside. + static RenderWidgetFullscreen* Create(int32 opener_id); virtual void show(WebKit::WebNavigationPolicy); protected: virtual WebKit::WebWidget* CreateWebWidget(); - RenderWidgetFullscreen(content::RenderThread* render_thread); + RenderWidgetFullscreen(); void Init(int32 opener_id); }; diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc index d84c91e..2a71e50 100644 --- a/content/renderer/render_widget_fullscreen_pepper.cc +++ b/content/renderer/render_widget_fullscreen_pepper.cc @@ -203,21 +203,19 @@ void DestroyContext(RendererGLContext* context, GLuint program, GLuint buffer) { // static RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( - int32 opener_id, content::RenderThread* render_thread, - webkit::ppapi::PluginInstance* plugin, + int32 opener_id, webkit::ppapi::PluginInstance* plugin, const GURL& active_url) { DCHECK_NE(MSG_ROUTING_NONE, opener_id); scoped_refptr<RenderWidgetFullscreenPepper> widget( - new RenderWidgetFullscreenPepper(render_thread, plugin, active_url)); + new RenderWidgetFullscreenPepper(plugin, active_url)); widget->Init(opener_id); return widget.release(); } RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( - content::RenderThread* render_thread, webkit::ppapi::PluginInstance* plugin, const GURL& active_url) - : RenderWidgetFullscreen(render_thread), + : RenderWidgetFullscreen(), active_url_(active_url), plugin_(plugin), context_(NULL), diff --git a/content/renderer/render_widget_fullscreen_pepper.h b/content/renderer/render_widget_fullscreen_pepper.h index e6d4d18..b8f095f 100644 --- a/content/renderer/render_widget_fullscreen_pepper.h +++ b/content/renderer/render_widget_fullscreen_pepper.h @@ -27,7 +27,6 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, public: static RenderWidgetFullscreenPepper* Create( int32 opener_id, - content::RenderThread* render_thread, webkit::ppapi::PluginInstance* plugin, const GURL& active_url); @@ -43,8 +42,7 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, void SwapBuffers(); protected: - RenderWidgetFullscreenPepper(content::RenderThread* render_thread, - webkit::ppapi::PluginInstance* plugin, + RenderWidgetFullscreenPepper(webkit::ppapi::PluginInstance* plugin, const GURL& active_url); virtual ~RenderWidgetFullscreenPepper(); |