OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 5 #ifndef CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
6 #define CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 6 #define CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlcom.h> | 9 #include <atlcom.h> |
10 #include <atlctl.h> | 10 #include <atlctl.h> |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive()); | 1069 DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive()); |
1070 if (!web_browser2) { | 1070 if (!web_browser2) { |
1071 NOTREACHED() << "Failed to retrieve IWebBrowser2 interface"; | 1071 NOTREACHED() << "Failed to retrieve IWebBrowser2 interface"; |
1072 return; | 1072 return; |
1073 } | 1073 } |
1074 base::win::ScopedVariant url; | 1074 base::win::ScopedVariant url; |
1075 // Check to see if the URL uses a "view-source:" prefix, if so, open it | 1075 // Check to see if the URL uses a "view-source:" prefix, if so, open it |
1076 // using chrome frame full tab mode by using 'cf:' protocol handler. | 1076 // using chrome frame full tab mode by using 'cf:' protocol handler. |
1077 // Also change the disposition to NEW_WINDOW since IE6 doesn't have tabs. | 1077 // Also change the disposition to NEW_WINDOW since IE6 doesn't have tabs. |
1078 if (url_to_open.has_scheme() && | 1078 if (url_to_open.has_scheme() && |
1079 (url_to_open.SchemeIs(chrome::kViewSourceScheme) || | 1079 (url_to_open.SchemeIs(content::kViewSourceScheme) || |
1080 url_to_open.SchemeIs(chrome::kAboutScheme))) { | 1080 url_to_open.SchemeIs(chrome::kAboutScheme))) { |
1081 std::wstring chrome_url; | 1081 std::wstring chrome_url; |
1082 chrome_url.append(kChromeProtocolPrefix); | 1082 chrome_url.append(kChromeProtocolPrefix); |
1083 chrome_url.append(UTF8ToWide(url_to_open.spec())); | 1083 chrome_url.append(UTF8ToWide(url_to_open.spec())); |
1084 url.Set(chrome_url.c_str()); | 1084 url.Set(chrome_url.c_str()); |
1085 open_disposition = NEW_WINDOW; | 1085 open_disposition = NEW_WINDOW; |
1086 } else { | 1086 } else { |
1087 url.Set(UTF8ToWide(url_to_open.spec()).c_str()); | 1087 url.Set(UTF8ToWide(url_to_open.spec()).c_str()); |
1088 } | 1088 } |
1089 | 1089 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 EventHandlers onreadystatechanged_; | 1219 EventHandlers onreadystatechanged_; |
1220 EventHandlers onprivatemessage_; | 1220 EventHandlers onprivatemessage_; |
1221 EventHandlers onextensionready_; | 1221 EventHandlers onextensionready_; |
1222 | 1222 |
1223 // Handle network requests when host network stack is used. Passed to the | 1223 // Handle network requests when host network stack is used. Passed to the |
1224 // automation client on initialization. | 1224 // automation client on initialization. |
1225 scoped_ptr<UrlmonUrlRequestManager> url_fetcher_; | 1225 scoped_ptr<UrlmonUrlRequestManager> url_fetcher_; |
1226 }; | 1226 }; |
1227 | 1227 |
1228 #endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 1228 #endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
OLD | NEW |