OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Implementation of ChromeActiveDocument | 5 // Implementation of ChromeActiveDocument |
6 #include "chrome_frame/chrome_active_document.h" | 6 #include "chrome_frame/chrome_active_document.h" |
7 | 7 |
8 #include <hlink.h> | 8 #include <hlink.h> |
9 #include <htiface.h> | 9 #include <htiface.h> |
10 #include <initguid.h> | 10 #include <initguid.h> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 if (info && !info->GetUrl().empty()) { | 225 if (info && !info->GetUrl().empty()) { |
226 url = info->GetUrl(); | 226 url = info->GetUrl(); |
227 if (mgr) { | 227 if (mgr) { |
228 // If the original URL contains an anchor, then the URL queried | 228 // If the original URL contains an anchor, then the URL queried |
229 // from the protocol sink wrapper does not contain the anchor. To | 229 // from the protocol sink wrapper does not contain the anchor. To |
230 // workaround this we retrieve the anchor from the navigation manager | 230 // workaround this we retrieve the anchor from the navigation manager |
231 // and append it to the url retrieved from the protocol sink wrapper. | 231 // and append it to the url retrieved from the protocol sink wrapper. |
232 GURL url_for_anchor(mgr->url()); | 232 GURL url_for_anchor(mgr->url()); |
233 if (url_for_anchor.has_ref()) { | 233 if (url_for_anchor.has_ref()) { |
234 url += L"#"; | 234 url += L"#"; |
235 url += UTF8ToWide(url_for_anchor.ref()); | 235 url += base::UTF8ToWide(url_for_anchor.ref()); |
236 } | 236 } |
237 } | 237 } |
238 } else { | 238 } else { |
239 // If the original URL contains an anchor, then the URL queried | 239 // If the original URL contains an anchor, then the URL queried |
240 // from the moniker does not contain the anchor. To workaround | 240 // from the moniker does not contain the anchor. To workaround |
241 // this we retrieve the URL from our BHO. | 241 // this we retrieve the URL from our BHO. |
242 url = GetActualUrlFromMoniker(moniker_name, bind_context, | 242 url = GetActualUrlFromMoniker(moniker_name, bind_context, |
243 mgr ? mgr->url(): std::wstring()); | 243 mgr ? mgr->url(): std::wstring()); |
244 } | 244 } |
245 | 245 |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 if (wparam) | 896 if (wparam) |
897 SetFocus(); | 897 SetFocus(); |
898 return 0; | 898 return 0; |
899 } | 899 } |
900 | 900 |
901 LRESULT ChromeActiveDocument::OnSetFocus(UINT message, WPARAM wparam, | 901 LRESULT ChromeActiveDocument::OnSetFocus(UINT message, WPARAM wparam, |
902 LPARAM lparam, | 902 LPARAM lparam, |
903 BOOL& handled) { // NO_LINT | 903 BOOL& handled) { // NO_LINT |
904 return 0; | 904 return 0; |
905 } | 905 } |
OLD | NEW |