| 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 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2624 ->renderer() | 2624 ->renderer() |
| 2625 ->CreateBrowserPluginDelegate(this, kBrowserPluginMimeType, | 2625 ->CreateBrowserPluginDelegate(this, kBrowserPluginMimeType, |
| 2626 GURL(params.url)) | 2626 GURL(params.url)) |
| 2627 ->GetWeakPtr()); | 2627 ->GetWeakPtr()); |
| 2628 } | 2628 } |
| 2629 | 2629 |
| 2630 #if defined(ENABLE_PLUGINS) | 2630 #if defined(ENABLE_PLUGINS) |
| 2631 WebPluginInfo info; | 2631 WebPluginInfo info; |
| 2632 std::string mime_type; | 2632 std::string mime_type; |
| 2633 bool found = false; | 2633 bool found = false; |
| 2634 WebString top_origin = frame->top()->getSecurityOrigin().toString(); | 2634 Send(new FrameHostMsg_GetPluginInfo( |
| 2635 Send(new FrameHostMsg_GetPluginInfo(routing_id_, params.url, | 2635 routing_id_, params.url, frame->top()->getSecurityOrigin(), |
| 2636 blink::WebStringToGURL(top_origin), | 2636 params.mimeType.utf8(), &found, &info, &mime_type)); |
| 2637 params.mimeType.utf8(), &found, &info, | |
| 2638 &mime_type)); | |
| 2639 if (!found) | 2637 if (!found) |
| 2640 return NULL; | 2638 return NULL; |
| 2641 | 2639 |
| 2642 WebPluginParams params_to_use = params; | 2640 WebPluginParams params_to_use = params; |
| 2643 params_to_use.mimeType = WebString::fromUTF8(mime_type); | 2641 params_to_use.mimeType = WebString::fromUTF8(mime_type); |
| 2644 return CreatePlugin(frame, info, params_to_use, nullptr /* throttler */); | 2642 return CreatePlugin(frame, info, params_to_use, nullptr /* throttler */); |
| 2645 #else | 2643 #else |
| 2646 return NULL; | 2644 return NULL; |
| 2647 #endif // defined(ENABLE_PLUGINS) | 2645 #endif // defined(ENABLE_PLUGINS) |
| 2648 } | 2646 } |
| (...skipping 3844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6493 // event target. Potentially a Pepper plugin will receive the event. | 6491 // event target. Potentially a Pepper plugin will receive the event. |
| 6494 // In order to tell whether a plugin gets the last mouse event and which it | 6492 // In order to tell whether a plugin gets the last mouse event and which it |
| 6495 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6493 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6496 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6494 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6497 // |pepper_last_mouse_event_target_|. | 6495 // |pepper_last_mouse_event_target_|. |
| 6498 pepper_last_mouse_event_target_ = nullptr; | 6496 pepper_last_mouse_event_target_ = nullptr; |
| 6499 #endif | 6497 #endif |
| 6500 } | 6498 } |
| 6501 | 6499 |
| 6502 } // namespace content | 6500 } // namespace content |
| OLD | NEW |