summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/media/buffered_data_source_unittest.cc4
-rw-r--r--webkit/glue/plugins/npapi_extension_thunk.cc70
-rw-r--r--webkit/glue/plugins/plugin_host.cc48
-rw-r--r--webkit/glue/plugins/plugin_lib_unittest.cc4
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.cc8
-rw-r--r--webkit/glue/webmediaplayer_impl.cc12
6 files changed, 73 insertions, 73 deletions
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc
index 929d8d9..81103b2 100644
--- a/webkit/glue/media/buffered_data_source_unittest.cc
+++ b/webkit/glue/media/buffered_data_source_unittest.cc
@@ -608,8 +608,8 @@ class BufferedDataSourceTest : public testing::Test {
// There is no need to provide a message loop to data source.
data_source_->set_host(&host_);
- scoped_refptr<NiceMock<MockBufferedResourceLoader> > first_loader =
- new NiceMock<MockBufferedResourceLoader>();
+ scoped_refptr<NiceMock<MockBufferedResourceLoader> > first_loader(
+ new NiceMock<MockBufferedResourceLoader>());
// Creates the mock loader to be injected.
loader_ = first_loader;
diff --git a/webkit/glue/plugins/npapi_extension_thunk.cc b/webkit/glue/plugins/npapi_extension_thunk.cc
index 4779535..05a9c5d 100644
--- a/webkit/glue/plugins/npapi_extension_thunk.cc
+++ b/webkit/glue/plugins/npapi_extension_thunk.cc
@@ -28,7 +28,7 @@ static NPAPI::PluginInstance* FindInstance(NPP id) {
static NPError Device2DQueryCapability(NPP id, int32_t capability,
int32_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
plugin->webplugin()->delegate()->Device2DQueryCapability(capability, value);
return NPERR_NO_ERROR;
@@ -40,7 +40,7 @@ static NPError Device2DQueryCapability(NPP id, int32_t capability,
static NPError Device2DQueryConfig(NPP id,
const NPDeviceConfig* request,
NPDeviceConfig* obtain) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DQueryConfig(
static_cast<const NPDeviceContext2DConfig*>(request),
@@ -52,7 +52,7 @@ static NPError Device2DQueryConfig(NPP id,
static NPError Device2DInitializeContext(NPP id,
const NPDeviceConfig* config,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DInitializeContext(
static_cast<const NPDeviceContext2DConfig*>(config),
@@ -65,7 +65,7 @@ static NPError Device2DSetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t value) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DSetStateContext(
static_cast<NPDeviceContext2D*>(context), state, value);
@@ -77,7 +77,7 @@ static NPError Device2DGetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DGetStateContext(
static_cast<NPDeviceContext2D*>(context), state, value);
@@ -89,7 +89,7 @@ static NPError Device2DFlushContext(NPP id,
NPDeviceContext* context,
NPDeviceFlushContextCallbackPtr callback,
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
NPError err = plugin->webplugin()->delegate()->Device2DFlushContext(
id, static_cast<NPDeviceContext2D*>(context), callback, user_data);
@@ -109,7 +109,7 @@ static NPError Device2DFlushContext(NPP id,
static NPError Device2DDestroyContext(NPP id,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DDestroyContext(
static_cast<NPDeviceContext2D*>(context));
@@ -141,7 +141,7 @@ static NPError Device2DMapBuffer(NPP id,
static NPError Device3DQueryCapability(NPP id, int32_t capability,
int32_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
plugin->webplugin()->delegate()->Device3DQueryCapability(capability, value);
return NPERR_NO_ERROR;
@@ -153,7 +153,7 @@ static NPError Device3DQueryCapability(NPP id, int32_t capability,
static NPError Device3DQueryConfig(NPP id,
const NPDeviceConfig* request,
NPDeviceConfig* obtain) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DQueryConfig(
static_cast<const NPDeviceContext3DConfig*>(request),
@@ -165,7 +165,7 @@ static NPError Device3DQueryConfig(NPP id,
static NPError Device3DInitializeContext(NPP id,
const NPDeviceConfig* config,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DInitializeContext(
static_cast<const NPDeviceContext3DConfig*>(config),
@@ -178,7 +178,7 @@ static NPError Device3DSetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t value) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DSetStateContext(
static_cast<NPDeviceContext3D*>(context), state, value);
@@ -190,7 +190,7 @@ static NPError Device3DGetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DGetStateContext(
static_cast<NPDeviceContext3D*>(context), state, value);
@@ -202,7 +202,7 @@ static NPError Device3DFlushContext(NPP id,
NPDeviceContext* context,
NPDeviceFlushContextCallbackPtr callback,
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DFlushContext(
id, static_cast<NPDeviceContext3D*>(context), callback, user_data);
@@ -212,7 +212,7 @@ static NPError Device3DFlushContext(NPP id,
static NPError Device3DDestroyContext(NPP id,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DDestroyContext(
static_cast<NPDeviceContext3D*>(context));
@@ -224,7 +224,7 @@ static NPError Device3DCreateBuffer(NPP id,
NPDeviceContext* context,
size_t size,
int32_t* buffer_id) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DCreateBuffer(
static_cast<NPDeviceContext3D*>(context), size, buffer_id);
@@ -235,7 +235,7 @@ static NPError Device3DCreateBuffer(NPP id,
static NPError Device3DDestroyBuffer(NPP id,
NPDeviceContext* context,
int32_t buffer_id) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DDestroyBuffer(
static_cast<NPDeviceContext3D*>(context), buffer_id);
@@ -247,7 +247,7 @@ static NPError Device3DMapBuffer(NPP id,
NPDeviceContext* context,
int32_t buffer_id,
NPDeviceBuffer* buffer) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DMapBuffer(
static_cast<NPDeviceContext3D*>(context), buffer_id, buffer);
@@ -258,7 +258,7 @@ static NPError Device3DMapBuffer(NPP id,
// Experimental 3D device API --------------------------------------------------
static NPError Device3DGetNumConfigs(NPP id, int32_t* num_configs) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DGetNumConfigs(num_configs);
}
@@ -268,7 +268,7 @@ static NPError Device3DGetNumConfigs(NPP id, int32_t* num_configs) {
static NPError Device3DGetConfigAttribs(NPP id,
int32_t config,
int32_t* attrib_list) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DGetConfigAttribs(
config,
@@ -281,7 +281,7 @@ static NPError Device3DCreateContext(NPP id,
int32_t config,
const int32_t* attrib_list,
NPDeviceContext** context) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DCreateContext(
config,
@@ -299,7 +299,7 @@ static NPError Device3DSynchronizeContext(
int32_t* output_attrib_list,
NPDeviceSynchronizeContextCallbackPtr callback,
void* callback_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DSynchronizeContext(
id,
@@ -319,7 +319,7 @@ static NPError Device3DRegisterCallback(
int32_t callback_type,
NPDeviceGenericCallbackPtr callback,
void* callback_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DRegisterCallback(
id,
@@ -335,7 +335,7 @@ static NPError Device3DRegisterCallback(
static NPError DeviceAudioQueryCapability(NPP id, int32_t capability,
int32_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
plugin->webplugin()->delegate()->DeviceAudioQueryCapability(capability,
value);
@@ -348,7 +348,7 @@ static NPError DeviceAudioQueryCapability(NPP id, int32_t capability,
static NPError DeviceAudioQueryConfig(NPP id,
const NPDeviceConfig* request,
NPDeviceConfig* obtain) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->DeviceAudioQueryConfig(
static_cast<const NPDeviceContextAudioConfig*>(request),
@@ -360,7 +360,7 @@ static NPError DeviceAudioQueryConfig(NPP id,
static NPError DeviceAudioInitializeContext(NPP id,
const NPDeviceConfig* config,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->DeviceAudioInitializeContext(
static_cast<const NPDeviceContextAudioConfig*>(config),
@@ -373,7 +373,7 @@ static NPError DeviceAudioSetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t value) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->DeviceAudioSetStateContext(
static_cast<NPDeviceContextAudio*>(context), state, value);
@@ -385,7 +385,7 @@ static NPError DeviceAudioGetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
return plugin->webplugin()->delegate()->DeviceAudioGetStateContext(
static_cast<NPDeviceContextAudio*>(context), state, value);
}
@@ -394,14 +394,14 @@ static NPError DeviceAudioFlushContext(NPP id,
NPDeviceContext* context,
NPDeviceFlushContextCallbackPtr callback,
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
return plugin->webplugin()->delegate()->DeviceAudioFlushContext(
id, static_cast<NPDeviceContextAudio*>(context), callback, user_data);
}
static NPError DeviceAudioDestroyContext(NPP id,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
return plugin->webplugin()->delegate()->DeviceAudioDestroyContext(
static_cast<NPDeviceContextAudio*>(context));
}
@@ -477,7 +477,7 @@ static NPError ChooseFile(NPP id,
NPChooseFileMode mode,
NPChooseFileCallback callback,
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NPERR_GENERIC_ERROR;
@@ -490,7 +490,7 @@ static NPError ChooseFile(NPP id,
}
static void NumberOfFindResultsChanged(NPP id, int total, bool final_result) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin) {
plugin->webplugin()->delegate()->NumberOfFindResultsChanged(
total, final_result);
@@ -498,13 +498,13 @@ static void NumberOfFindResultsChanged(NPP id, int total, bool final_result) {
}
static void SelectedFindResultChanged(NPP id, int index) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->webplugin()->delegate()->SelectedFindResultChanged(index);
}
static NPWidgetExtensions* GetWidgetExtensions(NPP id) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NULL;
@@ -512,7 +512,7 @@ static NPWidgetExtensions* GetWidgetExtensions(NPP id) {
}
static NPError NPSetCursor(NPP id, NPCursorType type) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NPERR_GENERIC_ERROR;
@@ -521,7 +521,7 @@ static NPError NPSetCursor(NPP id, NPCursorType type) {
}
static NPFontExtensions* GetFontExtensions(NPP id) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NULL;
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc
index add6c03..6345fb1 100644
--- a/webkit/glue/plugins/plugin_host.cc
+++ b/webkit/glue/plugins/plugin_host.cc
@@ -280,7 +280,7 @@ extern "C" {
// Allocates memory from the host's memory space.
void* NPN_MemAlloc(uint32_t size) {
- scoped_refptr<NPAPI::PluginHost> host = NPAPI::PluginHost::Singleton();
+ scoped_refptr<NPAPI::PluginHost> host(NPAPI::PluginHost::Singleton());
if (host != NULL) {
// Note: We must use the same allocator/deallocator
// that is used by the javascript library, as some of the
@@ -293,7 +293,7 @@ void* NPN_MemAlloc(uint32_t size) {
// Deallocates memory from the host's memory space
void NPN_MemFree(void* ptr) {
- scoped_refptr<NPAPI::PluginHost> host = NPAPI::PluginHost::Singleton();
+ scoped_refptr<NPAPI::PluginHost> host(NPAPI::PluginHost::Singleton());
if (host != NULL) {
if (ptr != NULL && ptr != reinterpret_cast<void*>(-1))
free(ptr);
@@ -318,8 +318,8 @@ NPError NPN_RequestRead(NPStream* stream, NPByteRange* range_list) {
if (!stream || !range_list)
return NPERR_GENERIC_ERROR;
- scoped_refptr<NPAPI::PluginInstance> plugin =
- reinterpret_cast<NPAPI::PluginInstance*>(stream->ndata);
+ scoped_refptr<NPAPI::PluginInstance> plugin(
+ reinterpret_cast<NPAPI::PluginInstance*>(stream->ndata));
if (!plugin.get())
return NPERR_GENERIC_ERROR;
@@ -336,7 +336,7 @@ static NPError GetURLNotify(NPP id,
if (!url)
return NPERR_INVALID_URL;
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (!plugin.get()) {
NOTREACHED();
return NPERR_GENERIC_ERROR;
@@ -401,7 +401,7 @@ static NPError PostURLNotify(NPP id,
if (!url)
return NPERR_INVALID_URL;
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (!plugin.get()) {
NOTREACHED();
return NPERR_GENERIC_ERROR;
@@ -548,7 +548,7 @@ NPError NPN_DestroyStream(NPP id, NPStream* stream, NPReason reason) {
//
//
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin.get() == NULL) {
NOTREACHED();
return NPERR_GENERIC_ERROR;
@@ -610,7 +610,7 @@ void NPN_InvalidateRect(NPP id, NPRect *invalidRect) {
// plug-ins at regularly timed intervals. To force a paint message, the
// plug-in can call NPN_ForceRedraw after calling this method.
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
DCHECK(plugin.get() != NULL);
if (plugin.get() && plugin->webplugin()) {
if (invalidRect) {
@@ -644,7 +644,7 @@ void NPN_InvalidateRegion(NPP id, NPRegion invalidRegion) {
// TODO: this is overkill--add platform-specific region handling (at the
// very least, fetch the region's bounding box and pass it to InvalidateRect).
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
DCHECK(plugin.get() != NULL);
if (plugin.get() && plugin->webplugin())
plugin->webplugin()->Invalidate();
@@ -673,7 +673,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
switch (static_cast<int>(variable)) {
case NPNVWindowNPObject: {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
NPObject *np_object = plugin->webplugin()->GetWindowScriptNPObject();
// Return value is expected to be retained, as
// described here:
@@ -689,7 +689,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
break;
}
case NPNVPluginElementNPObject: {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
NPObject *np_object = plugin->webplugin()->GetPluginElement();
// Return value is expected to be retained, as
// described here:
@@ -743,7 +743,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
}
case NPNVprivateModeBool: {
NPBool* private_mode = reinterpret_cast<NPBool*>(value);
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
*private_mode = plugin->webplugin()->IsOffTheRecord();
rv = NPERR_NO_ERROR;
break;
@@ -758,7 +758,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
// we still need to worry about future standard change that may conflict
// with the variable definition, in order to avoid duplicate case clauses
// in this big switch statement.
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin->plugin_lib()->plugin_info().path.value() ==
kDefaultPluginLibraryName) {
plugin->webplugin()->OnMissingPluginStatus(
@@ -769,7 +769,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
#if defined(OS_MACOSX)
case NPNVpluginDrawingModel: {
// return the drawing model that was negotiated when we initialized.
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
*reinterpret_cast<int*>(value) = plugin->drawing_model();
rv = NPERR_NO_ERROR;
break;
@@ -838,7 +838,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
NPError NPN_SetValue(NPP id, NPPVariable variable, void* value) {
// Allows the plugin to set various modes
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
switch(variable) {
case NPPVpluginWindowBool: {
// Sets windowless mode for display of the plugin
@@ -923,13 +923,13 @@ void* NPN_GetJavaPeer(NPP) {
}
void NPN_PushPopupsEnabledState(NPP id, NPBool enabled) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->PushPopupsEnabledState(enabled ? true : false);
}
void NPN_PopPopupsEnabledState(NPP id) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->PopPopupsEnabledState();
}
@@ -937,7 +937,7 @@ void NPN_PopPopupsEnabledState(NPP id) {
void NPN_PluginThreadAsyncCall(NPP id,
void (*func)(void*),
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->PluginThreadAsyncCall(func, user_data);
}
@@ -965,7 +965,7 @@ NPError NPN_GetValueForURL(NPP id,
break;
}
case NPNURLVCookie: {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NPERR_GENERIC_ERROR;
@@ -1005,7 +1005,7 @@ NPError NPN_SetValueForURL(NPP id,
switch (variable) {
case NPNURLVCookie: {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NPERR_GENERIC_ERROR;
@@ -1051,7 +1051,7 @@ uint32_t NPN_ScheduleTimer(NPP id,
uint32_t interval,
NPBool repeat,
void (*func)(NPP id, uint32_t timer_id)) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (!plugin)
return 0;
@@ -1059,7 +1059,7 @@ uint32_t NPN_ScheduleTimer(NPP id,
}
void NPN_UnscheduleTimer(NPP id, uint32_t timer_id) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->UnscheduleTimer(timer_id);
}
@@ -1068,7 +1068,7 @@ NPError NPN_PopUpContextMenu(NPP id, NPMenu* menu) {
if (!menu)
return NPERR_INVALID_PARAM;
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin.get()) {
return plugin->PopUpContextMenu(menu);
}
@@ -1080,7 +1080,7 @@ NPBool NPN_ConvertPoint(NPP id, double sourceX, double sourceY,
NPCoordinateSpace sourceSpace,
double *destX, double *destY,
NPCoordinateSpace destSpace) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
if (plugin.get()) {
return plugin->ConvertPoint(sourceX, sourceY, sourceSpace,
destX, destY, destSpace);
diff --git a/webkit/glue/plugins/plugin_lib_unittest.cc b/webkit/glue/plugins/plugin_lib_unittest.cc
index 5ac6bdc..45c4bb6 100644
--- a/webkit/glue/plugins/plugin_lib_unittest.cc
+++ b/webkit/glue/plugins/plugin_lib_unittest.cc
@@ -25,7 +25,7 @@ TEST(PluginLibLoading, UnloadAllPlugins) {
PluginLibTest::CreatePluginLib(FilePath()));
// Try with a single plugin lib.
- scoped_refptr<PluginLibTest> plugin_lib1 = new PluginLibTest();
+ scoped_refptr<PluginLibTest> plugin_lib1(new PluginLibTest());
NPAPI::PluginLib::UnloadAllPlugins();
// Need to create it again, it should have been destroyed above.
@@ -34,7 +34,7 @@ TEST(PluginLibLoading, UnloadAllPlugins) {
// Try with two plugin libs.
plugin_lib1 = new PluginLibTest();
- scoped_refptr<PluginLibTest> plugin_lib2 = new PluginLibTest();
+ scoped_refptr<PluginLibTest> plugin_lib2(new PluginLibTest());
NPAPI::PluginLib::UnloadAllPlugins();
// Need to create it again, it should have been destroyed above.
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc
index c54bbc8..6907c6f 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl.cc
@@ -32,8 +32,8 @@ WebPluginDelegateImpl* WebPluginDelegateImpl::Create(
const FilePath& filename,
const std::string& mime_type,
gfx::PluginWindowHandle containing_view) {
- scoped_refptr<NPAPI::PluginLib> plugin_lib =
- NPAPI::PluginLib::CreatePluginLib(filename);
+ scoped_refptr<NPAPI::PluginLib> plugin_lib(
+ NPAPI::PluginLib::CreatePluginLib(filename));
if (plugin_lib.get() == NULL)
return NULL;
@@ -41,8 +41,8 @@ WebPluginDelegateImpl* WebPluginDelegateImpl::Create(
if (err != NPERR_NO_ERROR)
return NULL;
- scoped_refptr<NPAPI::PluginInstance> instance =
- plugin_lib->CreateInstance(mime_type);
+ scoped_refptr<NPAPI::PluginInstance> instance(
+ plugin_lib->CreateInstance(mime_type));
return new WebPluginDelegateImpl(containing_view, instance.get());
}
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index d49e732..019a664 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -267,12 +267,12 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
&WebMediaPlayerImpl::Proxy::NetworkEventCallback));
// A simple data source that keeps all data in memory.
- scoped_refptr<SimpleDataSource> simple_data_source =
- new SimpleDataSource(MessageLoop::current(), bridge_factory_simple);
+ scoped_refptr<SimpleDataSource> simple_data_source(
+ new SimpleDataSource(MessageLoop::current(), bridge_factory_simple));
// A sophisticated data source that does memory caching.
- scoped_refptr<BufferedDataSource> buffered_data_source =
- new BufferedDataSource(MessageLoop::current(), bridge_factory_buffered);
+ scoped_refptr<BufferedDataSource> buffered_data_source(
+ new BufferedDataSource(MessageLoop::current(), bridge_factory_buffered));
proxy_->SetDataSource(buffered_data_source);
if (use_simple_data_source) {
@@ -633,8 +633,8 @@ WebKit::WebVideoFrame* WebMediaPlayerImpl::getCurrentFrame() {
void WebMediaPlayerImpl::putCurrentFrame(
WebKit::WebVideoFrame* web_video_frame) {
if (web_video_frame) {
- scoped_refptr<media::VideoFrame> video_frame =
- WebVideoFrameImpl::toVideoFrame(web_video_frame);
+ scoped_refptr<media::VideoFrame> video_frame(
+ WebVideoFrameImpl::toVideoFrame(web_video_frame));
proxy_->PutCurrentFrame(video_frame);
delete web_video_frame;
}