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