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

Side by Side Diff: src/plugin/PluginTabBase.h

Issue 4895405913407488: Issue #1234 - remove CString from declarations representing domains. (Closed)
Patch Set: Created Aug. 7, 2014, 7:46 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/plugin/PluginFilter.cpp ('k') | src/plugin/PluginTabBase.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef _PLUGIN_TAB_BASE_H_ 1 #ifndef _PLUGIN_TAB_BASE_H_
2 #define _PLUGIN_TAB_BASE_H_ 2 #define _PLUGIN_TAB_BASE_H_
3 3
4 4
5 #ifdef SUPPORT_DOM_TRAVERSER 5 #ifdef SUPPORT_DOM_TRAVERSER
6 class CPluginDomTraverser; 6 class CPluginDomTraverser;
7 #endif 7 #endif
8 8
9 #include "PluginUserSettings.h" 9 #include "PluginUserSettings.h"
10 #include "PluginFilter.h" 10 #include "PluginFilter.h"
11 #include "../shared/CriticalSection.h" 11 #include "../shared/CriticalSection.h"
12 #include <thread> 12 #include <thread>
13 #include <atomic> 13 #include <atomic>
14 14
15 class CPluginClass; 15 class CPluginClass;
16 16
17 17
18 class CPluginTabBase 18 class CPluginTabBase
19 { 19 {
20 20
21 friend class CPluginClass; 21 friend class CPluginClass;
22 22
23 protected: 23 protected:
24 24
25 CComAutoCriticalSection m_criticalSection; 25 CComAutoCriticalSection m_criticalSection;
26 CriticalSection m_csInject; 26 CriticalSection m_csInject;
27 27
28 CString m_documentDomain; 28 std::wstring m_documentDomain;
29 CString m_documentUrl; 29 CString m_documentUrl;
30 CPluginUserSettings m_pluginUserSettings; 30 CPluginUserSettings m_pluginUserSettings;
31 public: 31 public:
32 CPluginClass* m_plugin; 32 CPluginClass* m_plugin;
33 protected: 33 protected:
34 bool m_isActivated; 34 bool m_isActivated;
35 35
36 std::thread m_thread; 36 std::thread m_thread;
37 std::atomic<bool> m_continueThreadRunning; 37 std::atomic<bool> m_continueThreadRunning;
38 38
(...skipping 14 matching lines...) Expand all
53 #endif 53 #endif
54 #ifdef SUPPORT_CONFIG 54 #ifdef SUPPORT_CONFIG
55 static int s_configVersion; 55 static int s_configVersion;
56 #endif 56 #endif
57 57
58 void ThreadProc(); 58 void ThreadProc();
59 59
60 #ifdef SUPPORT_FRAME_CACHING 60 #ifdef SUPPORT_FRAME_CACHING
61 CComAutoCriticalSection m_criticalSectionCache; 61 CComAutoCriticalSection m_criticalSectionCache;
62 std::set<CString> m_cacheFrames; 62 std::set<CString> m_cacheFrames;
63 CString m_cacheDomain; 63 std::wstring m_cacheDomain;
64 #endif 64 #endif
65 65
66 void SetDocumentUrl(const CString& url); 66 void SetDocumentUrl(const CString& url);
67 void InjectABP(IWebBrowser2* browser); 67 void InjectABP(IWebBrowser2* browser);
68 public: 68 public:
69 69
70 CPluginTabBase(CPluginClass* plugin); 70 CPluginTabBase(CPluginClass* plugin);
71 ~CPluginTabBase(); 71 ~CPluginTabBase();
72 72
73 CString GetDocumentDomain(); 73 std::wstring GetDocumentDomain();
74 CString GetDocumentUrl(); 74 CString GetDocumentUrl();
75 75
76 virtual void OnActivate(); 76 virtual void OnActivate();
77 virtual void OnUpdate(); 77 virtual void OnUpdate();
78 virtual void OnNavigate(const CString& url); 78 virtual void OnNavigate(const CString& url);
79 virtual void OnDownloadComplete(IWebBrowser2* browser); 79 virtual void OnDownloadComplete(IWebBrowser2* browser);
80 virtual void OnDocumentComplete(IWebBrowser2* browser, const CString& url, boo l isDocumentBrowser); 80 virtual void OnDocumentComplete(IWebBrowser2* browser, const CString& url, boo l isDocumentBrowser);
81 81
82 static DWORD WINAPI TabThreadProc(LPVOID pParam); 82 static DWORD WINAPI TabThreadProc(LPVOID pParam);
83 83
84 #ifdef SUPPORT_FRAME_CACHING 84 #ifdef SUPPORT_FRAME_CACHING
85 void CacheFrame(const CString& url); 85 void CacheFrame(const CString& url);
86 bool IsFrameCached(const CString& url); 86 bool IsFrameCached(const CString& url);
87 void ClearFrameCache(const CString& domain=""); 87 void ClearFrameCache(const std::wstring& domain=L"");
88 #endif 88 #endif
89 89
90 }; 90 };
91 91
92 92
93 #endif // _PLUGIN_TAB_BASE_H_ 93 #endif // _PLUGIN_TAB_BASE_H_
OLDNEW
« no previous file with comments | « src/plugin/PluginFilter.cpp ('k') | src/plugin/PluginTabBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld