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

Side by Side Diff: src/plugin/PluginUtil.cpp

Issue 6567422169448448: Issue 119 - Switch to injecting CSS for element hiding (Closed)
Patch Set: Created Dec. 10, 2014, 5:12 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
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 #include <algorithm> 2 #include <algorithm>
3 #include <stdexcept> 3 #include <stdexcept>
4 #include <vector> 4 #include <vector>
5 5
6 #include "../shared/Utils.h" 6 #include "../shared/Utils.h"
7 #include "PluginUtil.h" 7 #include "PluginUtil.h"
8 #include "PluginSettings.h" 8 #include "PluginSettings.h"
9 9
10 std::wstring HtmlFolderPath() 10 std::wstring HtmlFolderPath()
(...skipping 10 matching lines...) Expand all
21 { 21 {
22 return FileUrl(HtmlFolderPath() + L"firstRun.html"); 22 return FileUrl(HtmlFolderPath() + L"firstRun.html");
23 } 23 }
24 24
25 std::wstring FileUrl(const std::wstring& path) 25 std::wstring FileUrl(const std::wstring& path)
26 { 26 {
27 std::wstring url = path; 27 std::wstring url = path;
28 std::replace(url.begin(), url.end(), L'\\', L'/'); 28 std::replace(url.begin(), url.end(), L'\\', L'/');
29 return L"file:///" + url; 29 return L"file:///" + url;
30 } 30 }
31
32 std::wstring GetLocationUrl(IWebBrowser2& browser)
33 {
34 std::wstring retValue;
35 ATL::CComBSTR locationUrl;
36 if (SUCCEEDED(browser.get_LocationURL(&locationUrl)) && !!locationUrl)
37 {
38 retValue.assign(locationUrl, locationUrl.Length());
39 }
40 return retValue;
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld