| 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2603 ->renderer() | 2603 ->renderer() |
| 2604 ->CreateBrowserPluginDelegate(this, kBrowserPluginMimeType, | 2604 ->CreateBrowserPluginDelegate(this, kBrowserPluginMimeType, |
| 2605 GURL(params.url)) | 2605 GURL(params.url)) |
| 2606 ->GetWeakPtr()); | 2606 ->GetWeakPtr()); |
| 2607 } | 2607 } |
| 2608 | 2608 |
| 2609 #if defined(ENABLE_PLUGINS) | 2609 #if defined(ENABLE_PLUGINS) |
| 2610 WebPluginInfo info; | 2610 WebPluginInfo info; |
| 2611 std::string mime_type; | 2611 std::string mime_type; |
| 2612 bool found = false; | 2612 bool found = false; |
| 2613 WebString top_origin = frame->top()->getSecurityOrigin().toString(); | 2613 Send(new FrameHostMsg_GetPluginInfo( |
| 2614 Send(new FrameHostMsg_GetPluginInfo(routing_id_, params.url, | 2614 routing_id_, params.url, frame->top()->getSecurityOrigin(), |
| 2615 blink::WebStringToGURL(top_origin), | 2615 params.mimeType.utf8(), &found, &info, &mime_type)); |
| 2616 params.mimeType.utf8(), &found, &info, | |
| 2617 &mime_type)); | |
| 2618 if (!found) | 2616 if (!found) |
| 2619 return NULL; | 2617 return NULL; |
| 2620 | 2618 |
| 2621 WebPluginParams params_to_use = params; | 2619 WebPluginParams params_to_use = params; |
| 2622 params_to_use.mimeType = WebString::fromUTF8(mime_type); | 2620 params_to_use.mimeType = WebString::fromUTF8(mime_type); |
| 2623 return CreatePlugin(frame, info, params_to_use, nullptr /* throttler */); | 2621 return CreatePlugin(frame, info, params_to_use, nullptr /* throttler */); |
| 2624 #else | 2622 #else |
| 2625 return NULL; | 2623 return NULL; |
| 2626 #endif // defined(ENABLE_PLUGINS) | 2624 #endif // defined(ENABLE_PLUGINS) |
| 2627 } | 2625 } |
| (...skipping 3803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6431 // event target. Potentially a Pepper plugin will receive the event. | 6429 // event target. Potentially a Pepper plugin will receive the event. |
| 6432 // In order to tell whether a plugin gets the last mouse event and which it | 6430 // In order to tell whether a plugin gets the last mouse event and which it |
| 6433 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6431 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6434 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6432 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6435 // |pepper_last_mouse_event_target_|. | 6433 // |pepper_last_mouse_event_target_|. |
| 6436 pepper_last_mouse_event_target_ = nullptr; | 6434 pepper_last_mouse_event_target_ = nullptr; |
| 6437 #endif | 6435 #endif |
| 6438 } | 6436 } |
| 6439 | 6437 |
| 6440 } // namespace content | 6438 } // namespace content |
| OLD | NEW |