| 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 #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> |
| 11 #include <wininet.h> | 11 #include <wininet.h> |
| 12 #include <shdeprecated.h> // for IBrowserService2 | 12 #include <shdeprecated.h> // for IBrowserService2 |
| 13 #include <shlguid.h> | 13 #include <shlguid.h> |
| 14 | 14 |
| 15 #include <set> | 15 #include <set> |
| 16 #include <string> | 16 #include <string> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram.h" |
| 20 #include "base/string_util.h" | 20 #include "base/string_util.h" |
| 21 #include "base/stringprintf.h" | 21 #include "base/stringprintf.h" |
| 22 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
| 23 #include "base/win/scoped_bstr.h" | 23 #include "base/win/scoped_bstr.h" |
| 24 #include "base/win/scoped_comptr.h" | 24 #include "base/win/scoped_comptr.h" |
| 25 #include "base/win/scoped_variant.h" | 25 #include "base/win/scoped_variant.h" |
| 26 #include "grit/chrome_frame_resources.h" | 26 #include "grit/chrome_frame_resources.h" |
| 27 #include "chrome/app/chrome_command_ids.h" |
| 27 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
| 28 #include "chrome_frame/chrome_frame_plugin.h" | 29 #include "chrome_frame/chrome_frame_plugin.h" |
| 29 #include "chrome_frame/com_message_event.h" | 30 #include "chrome_frame/com_message_event.h" |
| 30 #include "chrome_frame/com_type_info_holder.h" | 31 #include "chrome_frame/com_type_info_holder.h" |
| 31 #include "chrome_frame/simple_resource_loader.h" | 32 #include "chrome_frame/simple_resource_loader.h" |
| 32 #include "chrome_frame/urlmon_url_request.h" | 33 #include "chrome_frame/urlmon_url_request.h" |
| 33 #include "chrome_frame/urlmon_url_request_private.h" | 34 #include "chrome_frame/urlmon_url_request_private.h" |
| 34 #include "chrome_frame/utils.h" | 35 #include "chrome_frame/utils.h" |
| 35 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
| 36 #include "net/base/cookie_monster.h" | 37 #include "net/base/cookie_monster.h" |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 switch (cmd) { | 346 switch (cmd) { |
| 346 case IDS_CONTENT_CONTEXT_SAVEAUDIOAS: | 347 case IDS_CONTENT_CONTEXT_SAVEAUDIOAS: |
| 347 case IDS_CONTENT_CONTEXT_SAVEVIDEOAS: | 348 case IDS_CONTENT_CONTEXT_SAVEVIDEOAS: |
| 348 case IDS_CONTENT_CONTEXT_SAVEIMAGEAS: | 349 case IDS_CONTENT_CONTEXT_SAVEIMAGEAS: |
| 349 case IDS_CONTENT_CONTEXT_SAVELINKAS: { | 350 case IDS_CONTENT_CONTEXT_SAVELINKAS: { |
| 350 GURL referrer, url; | 351 GURL referrer, url; |
| 351 chrome_frame::GetMiniContextMenuData(cmd, params, &referrer, &url); | 352 chrome_frame::GetMiniContextMenuData(cmd, params, &referrer, &url); |
| 352 DoFileDownloadInIE(UTF8ToWide(url.spec()).c_str()); | 353 DoFileDownloadInIE(UTF8ToWide(url.spec()).c_str()); |
| 353 return true; | 354 return true; |
| 354 } | 355 } |
| 356 |
| 357 case IDC_PRINT: { |
| 358 automation_client_->PrintTab(); |
| 359 break; |
| 360 } |
| 355 } | 361 } |
| 356 } | 362 } |
| 357 | 363 |
| 358 return false; | 364 return false; |
| 359 } | 365 } |
| 360 | 366 |
| 361 // Should connections initiated by this class try to block | 367 // Should connections initiated by this class try to block |
| 362 // responses served with the X-Frame-Options header? | 368 // responses served with the X-Frame-Options header? |
| 363 // ActiveX controls genereally will want to do this, | 369 // ActiveX controls genereally will want to do this, |
| 364 // returning true, while true top-level documents | 370 // returning true, while true top-level documents |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 EventHandlers onreadystatechanged_; | 1207 EventHandlers onreadystatechanged_; |
| 1202 EventHandlers onprivatemessage_; | 1208 EventHandlers onprivatemessage_; |
| 1203 EventHandlers onextensionready_; | 1209 EventHandlers onextensionready_; |
| 1204 | 1210 |
| 1205 // Handle network requests when host network stack is used. Passed to the | 1211 // Handle network requests when host network stack is used. Passed to the |
| 1206 // automation client on initialization. | 1212 // automation client on initialization. |
| 1207 scoped_ptr<UrlmonUrlRequestManager> url_fetcher_; | 1213 scoped_ptr<UrlmonUrlRequestManager> url_fetcher_; |
| 1208 }; | 1214 }; |
| 1209 | 1215 |
| 1210 #endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ | 1216 #endif // CHROME_FRAME_CHROME_FRAME_ACTIVEX_BASE_H_ |
| OLD | NEW |