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 2597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2608 ->renderer() | 2608 ->renderer() |
2609 ->CreateBrowserPluginDelegate(this, kBrowserPluginMimeType, | 2609 ->CreateBrowserPluginDelegate(this, kBrowserPluginMimeType, |
2610 GURL(params.url)) | 2610 GURL(params.url)) |
2611 ->GetWeakPtr()); | 2611 ->GetWeakPtr()); |
2612 } | 2612 } |
2613 | 2613 |
2614 #if defined(ENABLE_PLUGINS) | 2614 #if defined(ENABLE_PLUGINS) |
2615 WebPluginInfo info; | 2615 WebPluginInfo info; |
2616 std::string mime_type; | 2616 std::string mime_type; |
2617 bool found = false; | 2617 bool found = false; |
2618 WebString top_origin = frame->top()->getSecurityOrigin().toString(); | 2618 Send(new FrameHostMsg_GetPluginInfo( |
2619 Send(new FrameHostMsg_GetPluginInfo(routing_id_, params.url, | 2619 routing_id_, params.url, frame->top()->getSecurityOrigin(), |
2620 blink::WebStringToGURL(top_origin), | 2620 params.mimeType.utf8(), &found, &info, &mime_type)); |
2621 params.mimeType.utf8(), &found, &info, | |
2622 &mime_type)); | |
2623 if (!found) | 2621 if (!found) |
2624 return NULL; | 2622 return NULL; |
2625 | 2623 |
2626 WebPluginParams params_to_use = params; | 2624 WebPluginParams params_to_use = params; |
2627 params_to_use.mimeType = WebString::fromUTF8(mime_type); | 2625 params_to_use.mimeType = WebString::fromUTF8(mime_type); |
2628 return CreatePlugin(frame, info, params_to_use, nullptr /* throttler */); | 2626 return CreatePlugin(frame, info, params_to_use, nullptr /* throttler */); |
2629 #else | 2627 #else |
2630 return NULL; | 2628 return NULL; |
2631 #endif // defined(ENABLE_PLUGINS) | 2629 #endif // defined(ENABLE_PLUGINS) |
2632 } | 2630 } |
(...skipping 3804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6437 // event target. Potentially a Pepper plugin will receive the event. | 6435 // event target. Potentially a Pepper plugin will receive the event. |
6438 // In order to tell whether a plugin gets the last mouse event and which it | 6436 // In order to tell whether a plugin gets the last mouse event and which it |
6439 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6437 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6440 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6438 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6441 // |pepper_last_mouse_event_target_|. | 6439 // |pepper_last_mouse_event_target_|. |
6442 pepper_last_mouse_event_target_ = nullptr; | 6440 pepper_last_mouse_event_target_ = nullptr; |
6443 #endif | 6441 #endif |
6444 } | 6442 } |
6445 | 6443 |
6446 } // namespace content | 6444 } // namespace content |
OLD | NEW |