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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 } | 547 } |
548 | 548 |
549 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, | 549 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, |
550 const WebPluginParams& params) { | 550 const WebPluginParams& params) { |
551 webkit::npapi::WebPluginInfo info; | 551 webkit::npapi::WebPluginInfo info; |
552 bool found; | 552 bool found; |
553 std::string mime_type; | 553 std::string mime_type; |
554 Send(new ViewHostMsg_GetPluginInfo( | 554 Send(new ViewHostMsg_GetPluginInfo( |
555 routing_id_, params.url, frame->top()->document().url(), | 555 routing_id_, params.url, frame->top()->document().url(), |
556 params.mimeType.utf8(), &found, &info, &mime_type)); | 556 params.mimeType.utf8(), &found, &info, &mime_type)); |
557 if (!found || !webkit::npapi::IsPluginEnabled(info)) | 557 if (!found) |
558 return NULL; | 558 return NULL; |
559 | 559 |
560 bool pepper_plugin_was_registered = false; | 560 bool pepper_plugin_was_registered = false; |
561 scoped_refptr<webkit::ppapi::PluginModule> pepper_module( | 561 scoped_refptr<webkit::ppapi::PluginModule> pepper_module( |
562 pepper_delegate_.CreatePepperPlugin(info.path, | 562 pepper_delegate_.CreatePepperPlugin(info.path, |
563 &pepper_plugin_was_registered)); | 563 &pepper_plugin_was_registered)); |
564 if (pepper_plugin_was_registered) { | 564 if (pepper_plugin_was_registered) { |
565 if (pepper_module) | 565 if (pepper_module) |
566 return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); | 566 return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); |
567 return NULL; | 567 return NULL; |
(...skipping 3888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4456 } | 4456 } |
4457 #endif | 4457 #endif |
4458 | 4458 |
4459 void RenderView::OnContextMenuClosed( | 4459 void RenderView::OnContextMenuClosed( |
4460 const webkit_glue::CustomContextMenuContext& custom_context) { | 4460 const webkit_glue::CustomContextMenuContext& custom_context) { |
4461 if (custom_context.is_pepper_menu) | 4461 if (custom_context.is_pepper_menu) |
4462 pepper_delegate_.OnContextMenuClosed(custom_context); | 4462 pepper_delegate_.OnContextMenuClosed(custom_context); |
4463 else | 4463 else |
4464 context_menu_node_.reset(); | 4464 context_menu_node_.reset(); |
4465 } | 4465 } |
OLD | NEW |