| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_view.h" | 5 #include "content/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 } | 544 } |
| 545 | 545 |
| 546 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, | 546 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, |
| 547 const WebPluginParams& params) { | 547 const WebPluginParams& params) { |
| 548 webkit::npapi::WebPluginInfo info; | 548 webkit::npapi::WebPluginInfo info; |
| 549 bool found; | 549 bool found; |
| 550 std::string mime_type; | 550 std::string mime_type; |
| 551 Send(new ViewHostMsg_GetPluginInfo( | 551 Send(new ViewHostMsg_GetPluginInfo( |
| 552 routing_id_, params.url, frame->top()->document().url(), | 552 routing_id_, params.url, frame->top()->document().url(), |
| 553 params.mimeType.utf8(), &found, &info, &mime_type)); | 553 params.mimeType.utf8(), &found, &info, &mime_type)); |
| 554 if (!found || !webkit::npapi::IsPluginEnabled(info)) | 554 if (!found) |
| 555 return NULL; | 555 return NULL; |
| 556 | 556 |
| 557 bool pepper_plugin_was_registered = false; | 557 bool pepper_plugin_was_registered = false; |
| 558 scoped_refptr<webkit::ppapi::PluginModule> pepper_module( | 558 scoped_refptr<webkit::ppapi::PluginModule> pepper_module( |
| 559 pepper_delegate_.CreatePepperPlugin(info.path, | 559 pepper_delegate_.CreatePepperPlugin(info.path, |
| 560 &pepper_plugin_was_registered)); | 560 &pepper_plugin_was_registered)); |
| 561 if (pepper_plugin_was_registered) { | 561 if (pepper_plugin_was_registered) { |
| 562 if (pepper_module) | 562 if (pepper_module) |
| 563 return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); | 563 return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); |
| 564 return NULL; | 564 return NULL; |
| (...skipping 3867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4432 } | 4432 } |
| 4433 #endif | 4433 #endif |
| 4434 | 4434 |
| 4435 void RenderView::OnContextMenuClosed( | 4435 void RenderView::OnContextMenuClosed( |
| 4436 const webkit_glue::CustomContextMenuContext& custom_context) { | 4436 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 4437 if (custom_context.is_pepper_menu) | 4437 if (custom_context.is_pepper_menu) |
| 4438 pepper_delegate_.OnContextMenuClosed(custom_context); | 4438 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 4439 else | 4439 else |
| 4440 context_menu_node_.reset(); | 4440 context_menu_node_.reset(); |
| 4441 } | 4441 } |
| OLD | NEW |