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 "webkit/glue/plugins/pepper_plugin_instance.h" | 5 #include "webkit/glue/plugins/pepper_plugin_instance.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
10 #include "base/mac_util.h" | 10 #include "base/mac_util.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" | 41 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" |
42 #include "third_party/WebKit/WebKit/chromium/public/WebElement.h" | 42 #include "third_party/WebKit/WebKit/chromium/public/WebElement.h" |
43 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 43 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
44 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" | 44 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" |
45 #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" | 45 #include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" |
46 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" | 46 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" |
47 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | 47 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
48 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" | 48 #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" |
49 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" | 49 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
50 #include "webkit/glue/plugins/pepper_buffer.h" | 50 #include "webkit/glue/plugins/pepper_buffer.h" |
| 51 #include "webkit/glue/plugins/pepper_common.h" |
51 #include "webkit/glue/plugins/pepper_graphics_2d.h" | 52 #include "webkit/glue/plugins/pepper_graphics_2d.h" |
52 #include "webkit/glue/plugins/pepper_event_conversion.h" | 53 #include "webkit/glue/plugins/pepper_event_conversion.h" |
53 #include "webkit/glue/plugins/pepper_fullscreen_container.h" | 54 #include "webkit/glue/plugins/pepper_fullscreen_container.h" |
54 #include "webkit/glue/plugins/pepper_image_data.h" | 55 #include "webkit/glue/plugins/pepper_image_data.h" |
55 #include "webkit/glue/plugins/pepper_plugin_delegate.h" | 56 #include "webkit/glue/plugins/pepper_plugin_delegate.h" |
56 #include "webkit/glue/plugins/pepper_plugin_module.h" | 57 #include "webkit/glue/plugins/pepper_plugin_module.h" |
57 #include "webkit/glue/plugins/pepper_string.h" | 58 #include "webkit/glue/plugins/pepper_string.h" |
58 #include "webkit/glue/plugins/pepper_url_loader.h" | 59 #include "webkit/glue/plugins/pepper_url_loader.h" |
59 #include "webkit/glue/plugins/pepper_var.h" | 60 #include "webkit/glue/plugins/pepper_var.h" |
60 #include "webkit/glue/plugins/ppp_private.h" | 61 #include "webkit/glue/plugins/ppp_private.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 return instance->GetWindowObject(); | 154 return instance->GetWindowObject(); |
154 } | 155 } |
155 | 156 |
156 PP_Var GetOwnerElementObject(PP_Instance instance_id) { | 157 PP_Var GetOwnerElementObject(PP_Instance instance_id) { |
157 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); | 158 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); |
158 if (!instance) | 159 if (!instance) |
159 return PP_MakeUndefined(); | 160 return PP_MakeUndefined(); |
160 return instance->GetOwnerElementObject(); | 161 return instance->GetOwnerElementObject(); |
161 } | 162 } |
162 | 163 |
163 bool BindGraphics(PP_Instance instance_id, PP_Resource device_id) { | 164 PP_Bool BindGraphics(PP_Instance instance_id, PP_Resource device_id) { |
164 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); | 165 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); |
165 if (!instance) | 166 if (!instance) |
166 return false; | 167 return PP_FALSE; |
167 return instance->BindGraphics(device_id); | 168 return BoolToPPBool(instance->BindGraphics(device_id)); |
168 } | 169 } |
169 | 170 |
170 bool IsFullFrame(PP_Instance instance_id) { | 171 PP_Bool IsFullFrame(PP_Instance instance_id) { |
171 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); | 172 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); |
172 if (!instance) | 173 if (!instance) |
173 return false; | 174 return PP_FALSE; |
174 return instance->full_frame(); | 175 return BoolToPPBool(instance->full_frame()); |
175 } | 176 } |
176 | 177 |
177 PP_Var ExecuteScript(PP_Instance instance_id, | 178 PP_Var ExecuteScript(PP_Instance instance_id, |
178 PP_Var script, | 179 PP_Var script, |
179 PP_Var* exception) { | 180 PP_Var* exception) { |
180 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); | 181 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); |
181 if (!instance) | 182 if (!instance) |
182 return PP_MakeUndefined(); | 183 return PP_MakeUndefined(); |
183 return instance->ExecuteScript(script, exception); | 184 return instance->ExecuteScript(script, exception); |
184 } | 185 } |
185 | 186 |
186 const PPB_Instance ppb_instance = { | 187 const PPB_Instance ppb_instance = { |
187 &GetWindowObject, | 188 &GetWindowObject, |
188 &GetOwnerElementObject, | 189 &GetOwnerElementObject, |
189 &BindGraphics, | 190 &BindGraphics, |
190 &IsFullFrame, | 191 &IsFullFrame, |
191 &ExecuteScript, | 192 &ExecuteScript, |
192 }; | 193 }; |
193 | 194 |
194 void NumberOfFindResultsChanged(PP_Instance instance_id, | 195 void NumberOfFindResultsChanged(PP_Instance instance_id, |
195 int32_t total, | 196 int32_t total, |
196 bool final_result) { | 197 PP_Bool final_result) { |
197 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); | 198 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); |
198 if (!instance) | 199 if (!instance) |
199 return; | 200 return; |
200 | 201 |
201 DCHECK_NE(instance->find_identifier(), -1); | 202 DCHECK_NE(instance->find_identifier(), -1); |
202 instance->delegate()->NumberOfFindResultsChanged( | 203 instance->delegate()->NumberOfFindResultsChanged( |
203 instance->find_identifier(), total, final_result); | 204 instance->find_identifier(), total, PPBoolToBool(final_result)); |
204 } | 205 } |
205 | 206 |
206 void SelectedFindResultChanged(PP_Instance instance_id, | 207 void SelectedFindResultChanged(PP_Instance instance_id, |
207 int32_t index) { | 208 int32_t index) { |
208 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); | 209 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); |
209 if (!instance) | 210 if (!instance) |
210 return; | 211 return; |
211 | 212 |
212 DCHECK_NE(instance->find_identifier(), -1); | 213 DCHECK_NE(instance->find_identifier(), -1); |
213 instance->delegate()->SelectedFindResultChanged( | 214 instance->delegate()->SelectedFindResultChanged( |
214 instance->find_identifier(), index); | 215 instance->find_identifier(), index); |
215 } | 216 } |
216 | 217 |
217 const PPB_Find_Dev ppb_find = { | 218 const PPB_Find_Dev ppb_find = { |
218 &NumberOfFindResultsChanged, | 219 &NumberOfFindResultsChanged, |
219 &SelectedFindResultChanged, | 220 &SelectedFindResultChanged, |
220 }; | 221 }; |
221 | 222 |
222 bool IsFullscreen(PP_Instance instance_id) { | 223 PP_Bool IsFullscreen(PP_Instance instance_id) { |
223 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); | 224 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); |
224 if (!instance) | 225 if (!instance) |
225 return false; | 226 return PP_FALSE; |
226 return instance->IsFullscreen(); | 227 return BoolToPPBool(instance->IsFullscreen()); |
227 } | 228 } |
228 | 229 |
229 bool SetFullscreen(PP_Instance instance_id, bool fullscreen) { | 230 PP_Bool SetFullscreen(PP_Instance instance_id, PP_Bool fullscreen) { |
230 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); | 231 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); |
231 if (!instance) | 232 if (!instance) |
232 return false; | 233 return PP_FALSE; |
233 return instance->SetFullscreen(fullscreen); | 234 return BoolToPPBool(instance->SetFullscreen(PPBoolToBool(fullscreen))); |
234 } | 235 } |
235 | 236 |
236 const PPB_Fullscreen_Dev ppb_fullscreen = { | 237 const PPB_Fullscreen_Dev ppb_fullscreen = { |
237 &IsFullscreen, | 238 &IsFullscreen, |
238 &SetFullscreen, | 239 &SetFullscreen, |
239 }; | 240 }; |
240 | 241 |
241 void ZoomChanged(PP_Instance instance_id, double factor) { | 242 void ZoomChanged(PP_Instance instance_id, double factor) { |
242 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); | 243 PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); |
243 if (!instance) | 244 if (!instance) |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 496 |
496 size_t argc = 0; | 497 size_t argc = 0; |
497 scoped_array<const char*> argn(new const char*[arg_names.size()]); | 498 scoped_array<const char*> argn(new const char*[arg_names.size()]); |
498 scoped_array<const char*> argv(new const char*[arg_names.size()]); | 499 scoped_array<const char*> argv(new const char*[arg_names.size()]); |
499 for (size_t i = 0; i < arg_names.size(); ++i) { | 500 for (size_t i = 0; i < arg_names.size(); ++i) { |
500 argn[argc] = arg_names[i].c_str(); | 501 argn[argc] = arg_names[i].c_str(); |
501 argv[argc] = arg_values[i].c_str(); | 502 argv[argc] = arg_values[i].c_str(); |
502 argc++; | 503 argc++; |
503 } | 504 } |
504 | 505 |
505 return instance_interface_->DidCreate(pp_instance(), | 506 return PPBoolToBool(instance_interface_->DidCreate(pp_instance(), |
506 argc, argn.get(), argv.get()); | 507 argc, |
| 508 argn.get(), |
| 509 argv.get())); |
507 } | 510 } |
508 | 511 |
509 bool PluginInstance::HandleDocumentLoad(URLLoader* loader) { | 512 bool PluginInstance::HandleDocumentLoad(URLLoader* loader) { |
510 Resource::ScopedResourceId resource(loader); | 513 Resource::ScopedResourceId resource(loader); |
511 return instance_interface_->HandleDocumentLoad(pp_instance(), resource.id); | 514 return PPBoolToBool(instance_interface_->HandleDocumentLoad(pp_instance(), |
| 515 resource.id)); |
512 } | 516 } |
513 | 517 |
514 bool PluginInstance::HandleInputEvent(const WebKit::WebInputEvent& event, | 518 bool PluginInstance::HandleInputEvent(const WebKit::WebInputEvent& event, |
515 WebCursorInfo* cursor_info) { | 519 WebCursorInfo* cursor_info) { |
516 std::vector<PP_InputEvent> pp_events; | 520 std::vector<PP_InputEvent> pp_events; |
517 CreatePPEvent(event, &pp_events); | 521 CreatePPEvent(event, &pp_events); |
518 | 522 |
519 // Each input event may generate more than one PP_InputEvent. | 523 // Each input event may generate more than one PP_InputEvent. |
520 bool rv = false; | 524 bool rv = false; |
521 for (size_t i = 0; i < pp_events.size(); i++) | 525 for (size_t i = 0; i < pp_events.size(); i++) { |
522 rv |= instance_interface_->HandleInputEvent(pp_instance(), &pp_events[i]); | 526 rv |= PPBoolToBool(instance_interface_->HandleInputEvent(pp_instance(), |
| 527 &pp_events[i])); |
| 528 } |
523 | 529 |
524 if (cursor_.get()) | 530 if (cursor_.get()) |
525 *cursor_info = *cursor_; | 531 *cursor_info = *cursor_; |
526 return rv; | 532 return rv; |
527 } | 533 } |
528 | 534 |
529 PP_Var PluginInstance::GetInstanceObject() { | 535 PP_Var PluginInstance::GetInstanceObject() { |
530 return instance_interface_->GetInstanceObject(pp_instance()); | 536 return instance_interface_->GetInstanceObject(pp_instance()); |
531 } | 537 } |
532 | 538 |
(...skipping 15 matching lines...) Expand all Loading... |
548 RectToPPRect(clip_, &pp_clip); | 554 RectToPPRect(clip_, &pp_clip); |
549 instance_interface_->DidChangeView(pp_instance(), &pp_position, &pp_clip); | 555 instance_interface_->DidChangeView(pp_instance(), &pp_position, &pp_clip); |
550 } | 556 } |
551 | 557 |
552 void PluginInstance::SetWebKitFocus(bool has_focus) { | 558 void PluginInstance::SetWebKitFocus(bool has_focus) { |
553 if (has_webkit_focus_ == has_focus) | 559 if (has_webkit_focus_ == has_focus) |
554 return; | 560 return; |
555 | 561 |
556 bool old_plugin_focus = PluginHasFocus(); | 562 bool old_plugin_focus = PluginHasFocus(); |
557 has_webkit_focus_ = has_focus; | 563 has_webkit_focus_ = has_focus; |
558 if (PluginHasFocus() != old_plugin_focus) | 564 if (PluginHasFocus() != old_plugin_focus) { |
559 instance_interface_->DidChangeFocus(pp_instance(), PluginHasFocus()); | 565 instance_interface_->DidChangeFocus(pp_instance(), |
| 566 BoolToPPBool(PluginHasFocus())); |
| 567 } |
560 } | 568 } |
561 | 569 |
562 void PluginInstance::SetContentAreaFocus(bool has_focus) { | 570 void PluginInstance::SetContentAreaFocus(bool has_focus) { |
563 if (has_content_area_focus_ == has_focus) | 571 if (has_content_area_focus_ == has_focus) |
564 return; | 572 return; |
565 | 573 |
566 bool old_plugin_focus = PluginHasFocus(); | 574 bool old_plugin_focus = PluginHasFocus(); |
567 has_content_area_focus_ = has_focus; | 575 has_content_area_focus_ = has_focus; |
568 if (PluginHasFocus() != old_plugin_focus) | 576 if (PluginHasFocus() != old_plugin_focus) { |
569 instance_interface_->DidChangeFocus(pp_instance(), PluginHasFocus()); | 577 instance_interface_->DidChangeFocus(pp_instance(), |
| 578 BoolToPPBool(PluginHasFocus())); |
| 579 } |
570 } | 580 } |
571 | 581 |
572 void PluginInstance::ViewInitiatedPaint() { | 582 void PluginInstance::ViewInitiatedPaint() { |
573 if (bound_graphics_2d_) | 583 if (bound_graphics_2d_) |
574 bound_graphics_2d_->ViewInitiatedPaint(); | 584 bound_graphics_2d_->ViewInitiatedPaint(); |
575 } | 585 } |
576 | 586 |
577 void PluginInstance::ViewFlushedPaint() { | 587 void PluginInstance::ViewFlushedPaint() { |
578 if (bound_graphics_2d_) | 588 if (bound_graphics_2d_) |
579 bound_graphics_2d_->ViewFlushedPaint(); | 589 bound_graphics_2d_->ViewFlushedPaint(); |
(...skipping 23 matching lines...) Expand all Loading... |
603 *dib = image_data->platform_image()->GetTransportDIB(); | 613 *dib = image_data->platform_image()->GetTransportDIB(); |
604 *location = plugin_backing_store_rect; | 614 *location = plugin_backing_store_rect; |
605 *clip = clip_; | 615 *clip = clip_; |
606 return true; | 616 return true; |
607 } | 617 } |
608 | 618 |
609 string16 PluginInstance::GetSelectedText(bool html) { | 619 string16 PluginInstance::GetSelectedText(bool html) { |
610 if (!LoadSelectionInterface()) | 620 if (!LoadSelectionInterface()) |
611 return string16(); | 621 return string16(); |
612 | 622 |
613 PP_Var rv = plugin_selection_interface_->GetSelectedText(pp_instance(), html); | 623 PP_Var rv = plugin_selection_interface_->GetSelectedText(pp_instance(), |
| 624 BoolToPPBool(html)); |
614 scoped_refptr<StringVar> string(StringVar::FromPPVar(rv)); | 625 scoped_refptr<StringVar> string(StringVar::FromPPVar(rv)); |
615 Var::PluginReleasePPVar(rv); // Release the ref the plugin transfered to us. | 626 Var::PluginReleasePPVar(rv); // Release the ref the plugin transfered to us. |
616 if (!string) | 627 if (!string) |
617 return string16(); | 628 return string16(); |
618 return UTF8ToUTF16(string->value()); | 629 return UTF8ToUTF16(string->value()); |
619 } | 630 } |
620 | 631 |
621 string16 PluginInstance::GetLinkAtPosition(const gfx::Point& point) { | 632 string16 PluginInstance::GetLinkAtPosition(const gfx::Point& point) { |
622 if (!LoadPrivateInterface()) | 633 if (!LoadPrivateInterface()) |
623 return string16(); | 634 return string16(); |
624 | 635 |
625 PP_Point p; | 636 PP_Point p; |
626 p.x = point.x(); | 637 p.x = point.x(); |
627 p.y = point.y(); | 638 p.y = point.y(); |
628 PP_Var rv = plugin_private_interface_->GetLinkAtPosition(pp_instance(), p); | 639 PP_Var rv = plugin_private_interface_->GetLinkAtPosition(pp_instance(), p); |
629 scoped_refptr<StringVar> string(StringVar::FromPPVar(rv)); | 640 scoped_refptr<StringVar> string(StringVar::FromPPVar(rv)); |
630 Var::PluginReleasePPVar(rv); // Release the ref the plugin transfered to us. | 641 Var::PluginReleasePPVar(rv); // Release the ref the plugin transfered to us. |
631 if (!string) | 642 if (!string) |
632 return string16(); | 643 return string16(); |
633 return UTF8ToUTF16(string->value()); | 644 return UTF8ToUTF16(string->value()); |
634 } | 645 } |
635 | 646 |
636 void PluginInstance::Zoom(double factor, bool text_only) { | 647 void PluginInstance::Zoom(double factor, bool text_only) { |
637 if (!LoadZoomInterface()) | 648 if (!LoadZoomInterface()) |
638 return; | 649 return; |
639 plugin_zoom_interface_->Zoom(pp_instance(), factor, text_only); | 650 plugin_zoom_interface_->Zoom(pp_instance(), factor, BoolToPPBool(text_only)); |
640 } | 651 } |
641 | 652 |
642 bool PluginInstance::StartFind(const string16& search_text, | 653 bool PluginInstance::StartFind(const string16& search_text, |
643 bool case_sensitive, | 654 bool case_sensitive, |
644 int identifier) { | 655 int identifier) { |
645 if (!LoadFindInterface()) | 656 if (!LoadFindInterface()) |
646 return false; | 657 return false; |
647 find_identifier_ = identifier; | 658 find_identifier_ = identifier; |
648 return plugin_find_interface_->StartFind( | 659 return PPBoolToBool( |
649 pp_instance(), | 660 plugin_find_interface_->StartFind( |
650 UTF16ToUTF8(search_text.c_str()).c_str(), | 661 pp_instance(), |
651 case_sensitive); | 662 UTF16ToUTF8(search_text.c_str()).c_str(), |
| 663 BoolToPPBool(case_sensitive))); |
652 } | 664 } |
653 | 665 |
654 void PluginInstance::SelectFindResult(bool forward) { | 666 void PluginInstance::SelectFindResult(bool forward) { |
655 if (LoadFindInterface()) | 667 if (LoadFindInterface()) |
656 plugin_find_interface_->SelectFindResult(pp_instance(), forward); | 668 plugin_find_interface_->SelectFindResult(pp_instance(), |
| 669 BoolToPPBool(forward)); |
657 } | 670 } |
658 | 671 |
659 void PluginInstance::StopFind() { | 672 void PluginInstance::StopFind() { |
660 if (!LoadFindInterface()) | 673 if (!LoadFindInterface()) |
661 return; | 674 return; |
662 find_identifier_ = -1; | 675 find_identifier_ = -1; |
663 plugin_find_interface_->StopFind(pp_instance()); | 676 plugin_find_interface_->StopFind(pp_instance()); |
664 } | 677 } |
665 | 678 |
666 bool PluginInstance::LoadFindInterface() { | 679 bool PluginInstance::LoadFindInterface() { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 // PrintBegin should not have been called since SupportsPrintInterface | 765 // PrintBegin should not have been called since SupportsPrintInterface |
753 // would have returned false; | 766 // would have returned false; |
754 NOTREACHED(); | 767 NOTREACHED(); |
755 return 0; | 768 return 0; |
756 } | 769 } |
757 | 770 |
758 PP_PrintSettings_Dev print_settings; | 771 PP_PrintSettings_Dev print_settings; |
759 RectToPPRect(printable_area, &print_settings.printable_area); | 772 RectToPPRect(printable_area, &print_settings.printable_area); |
760 print_settings.dpi = printer_dpi; | 773 print_settings.dpi = printer_dpi; |
761 print_settings.orientation = PP_PRINTORIENTATION_NORMAL; | 774 print_settings.orientation = PP_PRINTORIENTATION_NORMAL; |
762 print_settings.grayscale = false; | 775 print_settings.grayscale = PP_FALSE; |
763 print_settings.format = format; | 776 print_settings.format = format; |
764 int num_pages = plugin_print_interface_->Begin(pp_instance(), | 777 int num_pages = plugin_print_interface_->Begin(pp_instance(), |
765 &print_settings); | 778 &print_settings); |
766 if (!num_pages) | 779 if (!num_pages) |
767 return 0; | 780 return 0; |
768 current_print_settings_ = print_settings; | 781 current_print_settings_ = print_settings; |
769 #if defined (OS_LINUX) | 782 #if defined (OS_LINUX) |
770 num_pages_ = num_pages; | 783 num_pages_ = num_pages; |
771 pdf_output_done_ = false; | 784 pdf_output_done_ = false; |
772 #endif // (OS_LINUX) | 785 #endif // (OS_LINUX) |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 bounds.size.width = dest_rect.width(); | 1111 bounds.size.width = dest_rect.width(); |
1099 bounds.size.height = dest_rect.height(); | 1112 bounds.size.height = dest_rect.height(); |
1100 | 1113 |
1101 CGContextDrawImage(canvas, bounds, image); | 1114 CGContextDrawImage(canvas, bounds, image); |
1102 CGContextRestoreGState(canvas); | 1115 CGContextRestoreGState(canvas); |
1103 } | 1116 } |
1104 #endif // defined(OS_MACOSX) | 1117 #endif // defined(OS_MACOSX) |
1105 | 1118 |
1106 | 1119 |
1107 } // namespace pepper | 1120 } // namespace pepper |
OLD | NEW |