| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/test_runner/test_plugin.h" | 5 #include "components/test_runner/test_plugin.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 if (vertex_shader) | 540 if (vertex_shader) |
| 541 gl_->DeleteShader(vertex_shader); | 541 gl_->DeleteShader(vertex_shader); |
| 542 if (fragment_shader) | 542 if (fragment_shader) |
| 543 gl_->DeleteShader(fragment_shader); | 543 gl_->DeleteShader(fragment_shader); |
| 544 | 544 |
| 545 return program; | 545 return program; |
| 546 } | 546 } |
| 547 | 547 |
| 548 blink::WebInputEventResult TestPlugin::handleInputEvent( | 548 blink::WebInputEventResult TestPlugin::handleInputEvent( |
| 549 const blink::WebInputEvent& event, | 549 const blink::WebInputEvent& event, |
| 550 const std::vector<const blink::WebInputEvent*>& coalescedEvents, |
| 550 blink::WebCursorInfo& info) { | 551 blink::WebCursorInfo& info) { |
| 551 const char* event_name = blink::WebInputEvent::GetName(event.type); | 552 const char* event_name = blink::WebInputEvent::GetName(event.type); |
| 552 if (!strcmp(event_name, "") || !strcmp(event_name, "Undefined")) | 553 if (!strcmp(event_name, "") || !strcmp(event_name, "Undefined")) |
| 553 event_name = "unknown"; | 554 event_name = "unknown"; |
| 554 delegate_->PrintMessage(std::string("Plugin received event: ") + event_name + | 555 delegate_->PrintMessage(std::string("Plugin received event: ") + event_name + |
| 555 "\n"); | 556 "\n"); |
| 556 if (print_event_details_) | 557 if (print_event_details_) |
| 557 PrintEventDetails(delegate_, event); | 558 PrintEventDetails(delegate_, event); |
| 558 if (print_user_gesture_status_) | 559 if (print_user_gesture_status_) |
| 559 delegate_->PrintMessage( | 560 delegate_->PrintMessage( |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 return kPluginPersistsMimeType; | 623 return kPluginPersistsMimeType; |
| 623 } | 624 } |
| 624 | 625 |
| 625 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { | 626 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { |
| 626 return mime_type == TestPlugin::MimeType() || | 627 return mime_type == TestPlugin::MimeType() || |
| 627 mime_type == PluginPersistsMimeType() || | 628 mime_type == PluginPersistsMimeType() || |
| 628 mime_type == CanCreateWithoutRendererMimeType(); | 629 mime_type == CanCreateWithoutRendererMimeType(); |
| 629 } | 630 } |
| 630 | 631 |
| 631 } // namespace test_runner | 632 } // namespace test_runner |
| OLD | NEW |