| OLD | NEW |
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
| 2 | 2 |
| 3 #include "PluginClass.h" | 3 #include "PluginClass.h" |
| 4 #include "COM_Value.h" | 4 #include "COM_Value.h" |
| 5 #include "PluginSettings.h" | 5 #include "PluginSettings.h" |
| 6 #include "PluginSystem.h" | 6 #include "PluginSystem.h" |
| 7 #ifdef SUPPORT_FILTER | 7 #ifdef SUPPORT_FILTER |
| 8 #include "PluginFilter.h" | 8 #include "PluginFilter.h" |
| 9 #endif | 9 #endif |
| 10 #include "PluginMimeFilterClient.h" | 10 #include "PluginMimeFilterClient.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 m_hStatusBarWnd = NULL; | 87 m_hStatusBarWnd = NULL; |
| 88 m_hPaneWnd = NULL; | 88 m_hPaneWnd = NULL; |
| 89 m_nPaneWidth = 0; | 89 m_nPaneWidth = 0; |
| 90 m_pWndProcStatus = NULL; | 90 m_pWndProcStatus = NULL; |
| 91 m_hTheme = NULL; | 91 m_hTheme = NULL; |
| 92 m_isInitializedOk = false; | 92 m_isInitializedOk = false; |
| 93 | 93 |
| 94 | 94 |
| 95 m_tab = new CPluginTab(this); | 95 m_tab = new CPluginTab(this); |
| 96 | 96 |
| 97 CPluginSystem* system = CPluginSystem::GetInstance(); | 97 Dictionary::Create(GetBrowserLanguage()); |
| 98 | |
| 99 std::wstring locale((LPCWSTR)system->GetBrowserLanguage()); | |
| 100 Dictionary::Create(locale); | |
| 101 } | 98 } |
| 102 | 99 |
| 103 CPluginClass::~CPluginClass() | 100 CPluginClass::~CPluginClass() |
| 104 { | 101 { |
| 105 delete m_tab; | 102 delete m_tab; |
| 106 } | 103 } |
| 107 | 104 |
| 108 | 105 |
| 109 ///////////////////////////////////////////////////////////////////////////// | 106 ///////////////////////////////////////////////////////////////////////////// |
| 110 // Initialization | 107 // Initialization |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 246 |
| 250 | 247 |
| 251 // This gets called when a new browser window is created (which also triggers th
e | 248 // This gets called when a new browser window is created (which also triggers th
e |
| 252 // creation of this object). The pointer passed in should be to a IWebBrowser2 | 249 // creation of this object). The pointer passed in should be to a IWebBrowser2 |
| 253 // interface that represents the browser for the window. | 250 // interface that represents the browser for the window. |
| 254 // it is also called when a tab is closed, this unknownSite will be null | 251 // it is also called when a tab is closed, this unknownSite will be null |
| 255 // so we should handle that it is called this way several times during a session | 252 // so we should handle that it is called this way several times during a session |
| 256 STDMETHODIMP CPluginClass::SetSite(IUnknown* unknownSite) | 253 STDMETHODIMP CPluginClass::SetSite(IUnknown* unknownSite) |
| 257 { | 254 { |
| 258 CPluginSettings* settings = CPluginSettings::GetInstance(); | 255 CPluginSettings* settings = CPluginSettings::GetInstance(); |
| 259 CPluginSystem* system = CPluginSystem::GetInstance(); | |
| 260 | 256 |
| 261 MULTIPLE_VERSIONS_CHECK(); | 257 MULTIPLE_VERSIONS_CHECK(); |
| 262 | 258 |
| 263 if (unknownSite) | 259 if (unknownSite) |
| 264 { | 260 { |
| 265 | 261 |
| 266 DEBUG_GENERAL(L"============================================================
====================\nNEW TAB UI\n==============================================
==================================") | 262 DEBUG_GENERAL(L"============================================================
====================\nNEW TAB UI\n==============================================
==================================") |
| 267 | 263 |
| 268 HRESULT hr = ::CoInitialize(NULL); | 264 HRESULT hr = ::CoInitialize(NULL); |
| 269 if (FAILED(hr)) | 265 if (FAILED(hr)) |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 CloseHandle(hToken); | 1255 CloseHandle(hToken); |
| 1260 } | 1256 } |
| 1261 | 1257 |
| 1262 return fRet; | 1258 return fRet; |
| 1263 } | 1259 } |
| 1264 | 1260 |
| 1265 void CPluginClass::DisplayPluginMenu(HMENU hMenu, int nToolbarCmdID, POINT pt, U
INT nMenuFlags) | 1261 void CPluginClass::DisplayPluginMenu(HMENU hMenu, int nToolbarCmdID, POINT pt, U
INT nMenuFlags) |
| 1266 { | 1262 { |
| 1267 CPluginClient* client = CPluginClient::GetInstance(); | 1263 CPluginClient* client = CPluginClient::GetInstance(); |
| 1268 | 1264 |
| 1269 CPluginSystem* system = CPluginSystem::GetInstance(); | |
| 1270 | |
| 1271 // Create menu parent window | 1265 // Create menu parent window |
| 1272 HWND hMenuWnd = ::CreateWindowEx( | 1266 HWND hMenuWnd = ::CreateWindowEx( |
| 1273 NULL, | 1267 NULL, |
| 1274 MAKEINTATOM(GetAtomPaneClass()), | 1268 MAKEINTATOM(GetAtomPaneClass()), |
| 1275 L"", | 1269 L"", |
| 1276 0, | 1270 0, |
| 1277 0,0,0,0, | 1271 0,0,0,0, |
| 1278 NULL, | 1272 NULL, |
| 1279 NULL, | 1273 NULL, |
| 1280 _Module.m_hInst, | 1274 _Module.m_hInst, |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1668 | 1662 |
| 1669 LRESULT CALLBACK CPluginClass::PaneWindowProc(HWND hWnd, UINT message, WPARAM wP
aram, LPARAM lParam) | 1663 LRESULT CALLBACK CPluginClass::PaneWindowProc(HWND hWnd, UINT message, WPARAM wP
aram, LPARAM lParam) |
| 1670 { | 1664 { |
| 1671 // Find tab | 1665 // Find tab |
| 1672 CPluginClass *pClass = FindInstance(GetParent(hWnd)); | 1666 CPluginClass *pClass = FindInstance(GetParent(hWnd)); |
| 1673 if (!pClass) | 1667 if (!pClass) |
| 1674 { | 1668 { |
| 1675 return ::DefWindowProc(hWnd, message, wParam, lParam); | 1669 return ::DefWindowProc(hWnd, message, wParam, lParam); |
| 1676 } | 1670 } |
| 1677 | 1671 |
| 1678 CPluginSystem* system = CPluginSystem::GetInstance(); | |
| 1679 | |
| 1680 // Process message | 1672 // Process message |
| 1681 switch (message) | 1673 switch (message) |
| 1682 { | 1674 { |
| 1683 | 1675 |
| 1684 case WM_SETCURSOR: | 1676 case WM_SETCURSOR: |
| 1685 { | 1677 { |
| 1686 ::SetCursor(::LoadCursor(NULL, IDC_ARROW)); | 1678 ::SetCursor(::LoadCursor(NULL, IDC_ARROW)); |
| 1687 return TRUE; | 1679 return TRUE; |
| 1688 } | 1680 } |
| 1689 case WM_PAINT: | 1681 case WM_PAINT: |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 } | 1987 } |
| 1996 } | 1988 } |
| 1997 } | 1989 } |
| 1998 | 1990 |
| 1999 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); | 1991 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); |
| 2000 } | 1992 } |
| 2001 | 1993 |
| 2002 return hTabWnd; | 1994 return hTabWnd; |
| 2003 | 1995 |
| 2004 } | 1996 } |
| OLD | NEW |