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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 if (load_progress_tracker_ == NULL) | 541 if (load_progress_tracker_ == NULL) |
542 load_progress_tracker_.reset(new LoadProgressTracker(this)); | 542 load_progress_tracker_.reset(new LoadProgressTracker(this)); |
543 } | 543 } |
544 | 544 |
545 void RenderView::PluginCrashed(const FilePath& plugin_path) { | 545 void RenderView::PluginCrashed(const FilePath& plugin_path) { |
546 Send(new ViewHostMsg_CrashedPlugin(routing_id_, plugin_path)); | 546 Send(new ViewHostMsg_CrashedPlugin(routing_id_, plugin_path)); |
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::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 || !webkit::IsPluginEnabled(info)) |
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 3921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4489 } | 4489 } |
4490 #endif | 4490 #endif |
4491 | 4491 |
4492 void RenderView::OnContextMenuClosed( | 4492 void RenderView::OnContextMenuClosed( |
4493 const webkit_glue::CustomContextMenuContext& custom_context) { | 4493 const webkit_glue::CustomContextMenuContext& custom_context) { |
4494 if (custom_context.is_pepper_menu) | 4494 if (custom_context.is_pepper_menu) |
4495 pepper_delegate_.OnContextMenuClosed(custom_context); | 4495 pepper_delegate_.OnContextMenuClosed(custom_context); |
4496 else | 4496 else |
4497 context_menu_node_.reset(); | 4497 context_menu_node_.reset(); |
4498 } | 4498 } |
OLD | NEW |