Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Side by Side Diff: content/renderer/render_view.cc

Issue 7387010: Add PluginServiceFilter interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add resource_context Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 3844 matching lines...) Expand 10 before | Expand all | Expand 10 after
4409 } 4409 }
4410 #endif 4410 #endif
4411 4411
4412 void RenderView::OnContextMenuClosed( 4412 void RenderView::OnContextMenuClosed(
4413 const webkit_glue::CustomContextMenuContext& custom_context) { 4413 const webkit_glue::CustomContextMenuContext& custom_context) {
4414 if (custom_context.is_pepper_menu) 4414 if (custom_context.is_pepper_menu)
4415 pepper_delegate_.OnContextMenuClosed(custom_context); 4415 pepper_delegate_.OnContextMenuClosed(custom_context);
4416 else 4416 else
4417 context_menu_node_.reset(); 4417 context_menu_node_.reset();
4418 } 4418 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698