| OLD | NEW |
| 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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 reinterpret_cast<void**>(browser_priv2.Receive())); | 840 reinterpret_cast<void**>(browser_priv2.Receive())); |
| 841 } | 841 } |
| 842 | 842 |
| 843 DCHECK(browser_priv2); | 843 DCHECK(browser_priv2); |
| 844 | 844 |
| 845 if (browser_priv2) { | 845 if (browser_priv2) { |
| 846 ScopedComPtr<IUri> uri_obj; | 846 ScopedComPtr<IUri> uri_obj; |
| 847 uri_container->GetIUri(uri_obj.Receive()); | 847 uri_container->GetIUri(uri_obj.Receive()); |
| 848 DCHECK(uri_obj); | 848 DCHECK(uri_obj); |
| 849 | 849 |
| 850 hr = browser_priv2->NavigateWithBindCtx2(uri_obj, NULL, NULL, NULL, | 850 if (GetIEVersion() < IE_9) { |
| 851 headers_var.AsInput(), bind_ctx, | 851 hr = browser_priv2->NavigateWithBindCtx2( |
| 852 const_cast<wchar_t*>(fragment)); | 852 uri_obj, NULL, NULL, NULL, headers_var.AsInput(), bind_ctx, |
| 853 const_cast<wchar_t*>(fragment)); |
| 854 } else { |
| 855 IWebBrowserPriv2CommonIE9* browser_priv2_ie9 = |
| 856 reinterpret_cast<IWebBrowserPriv2CommonIE9*>(browser_priv2.get()); |
| 857 hr = browser_priv2_ie9->NavigateWithBindCtx2( |
| 858 uri_obj, NULL, NULL, NULL, headers_var.AsInput(), bind_ctx, |
| 859 const_cast<wchar_t*>(fragment), 0); |
| 860 } |
| 853 DLOG_IF(WARNING, FAILED(hr)) | 861 DLOG_IF(WARNING, FAILED(hr)) |
| 854 << base::StringPrintf(L"NavigateWithBindCtx2 0x%08X", hr); | 862 << base::StringPrintf(L"NavigateWithBindCtx2 0x%08X", hr); |
| 855 } | 863 } |
| 856 } else { | 864 } else { |
| 857 // IE6 | 865 // IE6 |
| 858 LPOLESTR url = NULL; | 866 LPOLESTR url = NULL; |
| 859 if (SUCCEEDED(hr = moniker->GetDisplayName(bind_ctx, NULL, &url))) { | 867 if (SUCCEEDED(hr = moniker->GetDisplayName(bind_ctx, NULL, &url))) { |
| 860 DVLOG(1) << __FUNCTION__ << " " << url; | 868 DVLOG(1) << __FUNCTION__ << " " << url; |
| 861 ScopedComPtr<IWebBrowserPriv> browser_priv; | 869 ScopedComPtr<IWebBrowserPriv> browser_priv; |
| 862 if (SUCCEEDED(hr = browser_priv.QueryFrom(web_browser2))) { | 870 if (SUCCEEDED(hr = browser_priv.QueryFrom(web_browser2))) { |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 ++url_list; | 1573 ++url_list; |
| 1566 } | 1574 } |
| 1567 } | 1575 } |
| 1568 | 1576 |
| 1569 std::wstring GetCurrentModuleVersion() { | 1577 std::wstring GetCurrentModuleVersion() { |
| 1570 scoped_ptr<FileVersionInfo> module_version_info( | 1578 scoped_ptr<FileVersionInfo> module_version_info( |
| 1571 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); | 1579 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); |
| 1572 DCHECK(module_version_info.get() != NULL); | 1580 DCHECK(module_version_info.get() != NULL); |
| 1573 return module_version_info->file_version(); | 1581 return module_version_info->file_version(); |
| 1574 } | 1582 } |
| OLD | NEW |