Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: chrome_frame/utils.cc

Issue 5507001: base: Remove stub scoped_variant_win.h file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/test/ui_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome_frame/utils.h" 5 #include "chrome_frame/utils.h"
6 6
7 #include <htiframe.h> 7 #include <htiframe.h>
8 #include <mshtml.h> 8 #include <mshtml.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 10
(...skipping 23 matching lines...) Expand all
34 #include "chrome_frame/policy_settings.h" 34 #include "chrome_frame/policy_settings.h"
35 #include "chrome_frame/simple_resource_loader.h" 35 #include "chrome_frame/simple_resource_loader.h"
36 #include "googleurl/src/gurl.h" 36 #include "googleurl/src/gurl.h"
37 #include "googleurl/src/url_canon.h" 37 #include "googleurl/src/url_canon.h"
38 #include "grit/chromium_strings.h" 38 #include "grit/chromium_strings.h"
39 #include "net/base/escape.h" 39 #include "net/base/escape.h"
40 #include "net/http/http_util.h" 40 #include "net/http/http_util.h"
41 41
42 using base::win::RegKey; 42 using base::win::RegKey;
43 using base::win::ScopedComPtr; 43 using base::win::ScopedComPtr;
44 using base::win::ScopedVariant;
45 44
46 // Note that these values are all lower case and are compared to 45 // Note that these values are all lower case and are compared to
47 // lower-case-transformed values. 46 // lower-case-transformed values.
48 const wchar_t kMetaTag[] = L"meta"; 47 const wchar_t kMetaTag[] = L"meta";
49 const wchar_t kHttpEquivAttribName[] = L"http-equiv"; 48 const wchar_t kHttpEquivAttribName[] = L"http-equiv";
50 const wchar_t kContentAttribName[] = L"content"; 49 const wchar_t kContentAttribName[] = L"content";
51 const wchar_t kXUACompatValue[] = L"x-ua-compatible"; 50 const wchar_t kXUACompatValue[] = L"x-ua-compatible";
52 const wchar_t kBodyTag[] = L"body"; 51 const wchar_t kBodyTag[] = L"body";
53 const wchar_t kChromeContentPrefix[] = L"chrome="; 52 const wchar_t kChromeContentPrefix[] = L"chrome=";
54 const char kGCFProtocol[] = "gcf"; 53 const char kGCFProtocol[] = "gcf";
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 817
819 // TODO(tommi): See if we can get HlinkSimpleNavigateToMoniker to work 818 // TODO(tommi): See if we can get HlinkSimpleNavigateToMoniker to work
820 // instead. Looks like we'll need to support IHTMLDocument2 (get_URL in 819 // instead. Looks like we'll need to support IHTMLDocument2 (get_URL in
821 // particular), access to IWebBrowser2 etc. 820 // particular), access to IWebBrowser2 etc.
822 // HlinkSimpleNavigateToMoniker(moniker, url, NULL, host, bind_context, 821 // HlinkSimpleNavigateToMoniker(moniker, url, NULL, host, bind_context,
823 // NULL, 0, 0); 822 // NULL, 0, 0);
824 823
825 ScopedComPtr<IUriContainer> uri_container; 824 ScopedComPtr<IUriContainer> uri_container;
826 hr = uri_container.QueryFrom(moniker); 825 hr = uri_container.QueryFrom(moniker);
827 826
828 ScopedVariant headers_var; 827 base::win::ScopedVariant headers_var;
829 if (headers && headers[0]) 828 if (headers && headers[0])
830 headers_var.Set(headers); 829 headers_var.Set(headers);
831 830
832 if (uri_container) { 831 if (uri_container) {
833 // IE7 and IE8. 832 // IE7 and IE8.
834 const IID* interface_ids[] = { 833 const IID* interface_ids[] = {
835 &IID_IWebBrowserPriv2IE7, 834 &IID_IWebBrowserPriv2IE7,
836 &IID_IWebBrowserPriv2IE8, 835 &IID_IWebBrowserPriv2IE8,
837 &IID_IWebBrowserPriv2IE8XP, 836 &IID_IWebBrowserPriv2IE8XP,
838 &IID_IWebBrowserPriv2IE8XPBeta, 837 &IID_IWebBrowserPriv2IE8XPBeta,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 // manager and use it. 872 // manager and use it.
874 if (target_url.has_ref()) { 873 if (target_url.has_ref()) {
875 url_parse::Component comp; 874 url_parse::Component comp;
876 GURL::Replacements replacements; 875 GURL::Replacements replacements;
877 replacements.SetRef("", comp); 876 replacements.SetRef("", comp);
878 877
879 target_url = target_url.ReplaceComponents(replacements); 878 target_url = target_url.ReplaceComponents(replacements);
880 fragment = NULL; 879 fragment = NULL;
881 } 880 }
882 881
883 ScopedVariant var_url(UTF8ToWide(target_url.spec()).c_str()); 882 base::win::ScopedVariant var_url(UTF8ToWide(target_url.spec()).c_str());
884 hr = browser_priv->NavigateWithBindCtx(var_url.AsInput(), NULL, NULL, 883 hr = browser_priv->NavigateWithBindCtx(var_url.AsInput(), NULL, NULL,
885 NULL, headers_var.AsInput(), 884 NULL, headers_var.AsInput(),
886 bind_ctx, 885 bind_ctx,
887 const_cast<wchar_t*>(fragment)); 886 const_cast<wchar_t*>(fragment));
888 DLOG_IF(WARNING, FAILED(hr)) 887 DLOG_IF(WARNING, FAILED(hr))
889 << base::StringPrintf(L"NavigateWithBindCtx 0x%08X", hr); 888 << base::StringPrintf(L"NavigateWithBindCtx 0x%08X", hr);
890 } else { 889 } else {
891 NOTREACHED(); 890 NOTREACHED();
892 } 891 }
893 ::CoTaskMemFree(url); 892 ::CoTaskMemFree(url);
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 1574
1576 void EnumerateKeyValues(HKEY parent_key, const wchar_t* sub_key_name, 1575 void EnumerateKeyValues(HKEY parent_key, const wchar_t* sub_key_name,
1577 std::vector<std::wstring>* values) { 1576 std::vector<std::wstring>* values) {
1578 DCHECK(values); 1577 DCHECK(values);
1579 base::win::RegistryValueIterator url_list(parent_key, sub_key_name); 1578 base::win::RegistryValueIterator url_list(parent_key, sub_key_name);
1580 while (url_list.Valid()) { 1579 while (url_list.Valid()) {
1581 values->push_back(url_list.Value()); 1580 values->push_back(url_list.Value());
1582 ++url_list; 1581 ++url_list;
1583 } 1582 }
1584 } 1583 }
OLDNEW
« no previous file with comments | « chrome_frame/test/ui_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698