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 #include "chrome/renderer/pepper/pepper_flash_renderer_host.h" | 5 #include "chrome/renderer/pepper/pepper_flash_renderer_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 REJECT_OTHER_HEADERS, | 93 REJECT_OTHER_HEADERS, |
94 | 94 |
95 // Total number of rejected navigate requests. | 95 // Total number of rejected navigate requests. |
96 TOTAL_REJECTED_NAVIGATE_REQUESTS, | 96 TOTAL_REJECTED_NAVIGATE_REQUESTS, |
97 | 97 |
98 // Total number of navigate requests. | 98 // Total number of navigate requests. |
99 TOTAL_NAVIGATE_REQUESTS, | 99 TOTAL_NAVIGATE_REQUESTS, |
100 FLASH_NAVIGATE_USAGE_ENUM_COUNT | 100 FLASH_NAVIGATE_USAGE_ENUM_COUNT |
101 }; | 101 }; |
102 | 102 |
103 static base::LazyInstance<std::map<std::string, FlashNavigateUsage> > | 103 static base::LazyInstance<std::map<std::string, FlashNavigateUsage>>:: |
104 g_rejected_headers = LAZY_INSTANCE_INITIALIZER; | 104 DestructorAtExit g_rejected_headers = LAZY_INSTANCE_INITIALIZER; |
105 | 105 |
106 bool IsSimpleHeader(const std::string& lower_case_header_name, | 106 bool IsSimpleHeader(const std::string& lower_case_header_name, |
107 const std::string& header_value) { | 107 const std::string& header_value) { |
108 if (lower_case_header_name == "accept" || | 108 if (lower_case_header_name == "accept" || |
109 lower_case_header_name == "accept-language" || | 109 lower_case_header_name == "accept-language" || |
110 lower_case_header_name == "content-language") { | 110 lower_case_header_name == "content-language") { |
111 return true; | 111 return true; |
112 } | 112 } |
113 | 113 |
114 if (lower_case_header_name == "content-type") { | 114 if (lower_case_header_name == "content-type") { |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 rect.point.x, rect.point.y, rect.size.width, rect.size.height))) | 370 rect.point.x, rect.point.y, rect.size.width, rect.size.height))) |
371 return PP_OK; | 371 return PP_OK; |
372 return PP_ERROR_FAILED; | 372 return PP_ERROR_FAILED; |
373 } | 373 } |
374 | 374 |
375 int32_t PepperFlashRendererHost::OnInvokePrinting( | 375 int32_t PepperFlashRendererHost::OnInvokePrinting( |
376 ppapi::host::HostMessageContext* host_context) { | 376 ppapi::host::HostMessageContext* host_context) { |
377 pdf::PepperPDFHost::InvokePrintingForInstance(pp_instance()); | 377 pdf::PepperPDFHost::InvokePrintingForInstance(pp_instance()); |
378 return PP_OK; | 378 return PP_OK; |
379 } | 379 } |
OLD | NEW |