Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginTabBase.cpp

Issue 10825021: Move settings page into the application directory (Closed)
Patch Set: Created June 3, 2013, 11:40 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/plugin/PluginTabBase.cpp
===================================================================
--- a/src/plugin/PluginTabBase.cpp
+++ b/src/plugin/PluginTabBase.cpp
@@ -157,44 +157,44 @@ void CPluginTabBase::OnDocumentComplete(
if (isDocumentBrowser)
{
if (url != documentUrl)
{
SetDocumentUrl(url);
}
CString log;
- log.Format(L"Current URL: %s, settings URL: %s", url, UserSettingsFileUrl());
+ log.Format(L"Current URL: %s, settings URL: %s", url, UserSettingsFileUrl().c_str());
DEBUG_ERROR_LOG(0, 0, 0, log);
- if (0 == url.CompareNoCase(UserSettingsFileUrl()))
+ if (0 == url.CompareNoCase(CString(UserSettingsFileUrl().c_str())))
{
CComPtr<IDispatch> pDocDispatch;
browser->get_Document(&pDocDispatch);
CComQIPtr<IHTMLDocument2> pDoc2 = pDocDispatch;
- if (pDoc2)
+ if (pDoc2)
{
CComPtr<IHTMLWindow2> pWnd2;
pDoc2->get_parentWindow(&pWnd2);
- if (pWnd2)
+ if (pWnd2)
{
- CComQIPtr<IDispatchEx> pWndEx = pWnd2;
- if (pWndEx)
+ CComQIPtr<IDispatchEx> pWndEx = pWnd2;
+ if (pWndEx)
{
- // Create "Settings" object in JavaScript.
+ // Create "Settings" object in JavaScript.
// A method call of "Settings" in JavaScript, transfered to "Invoke" of m_pluginUserSettings
DISPID dispid;
HRESULT hr = pWndEx->GetDispID(L"Settings", fdexNameEnsure, &dispid);
if (SUCCEEDED(hr))
{
CComVariant var((IDispatch*)&m_pluginUserSettings);
DISPPARAMS params;
params.cArgs = 1;
params.cNamedArgs = 0;
- params.rgvarg = &var;
+ params.rgvarg = &var;
params.rgdispidNamedArgs = 0;
hr = pWndEx->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYPUT | DISPATCH_PROPERTYPUTREF, &params, 0, 0, 0);
if (FAILED(hr))
{
DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_CREATE_SETTINGS_JAVASCRIPT, PLUGIN_ERROR_CREATE_SETTINGS_JAVASCRIPT_INVOKE, "CPluginTabBase::OnDocumentComplete - Failed to create Settings in JavaScript");
}
}
}

Powered by Google App Engine
This is Rietveld