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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 bool ChromeContentRendererClient::OverrideCreatePlugin( 273 bool ChromeContentRendererClient::OverrideCreatePlugin(
274 content::RenderView* render_view, 274 content::RenderView* render_view,
275 WebFrame* frame, 275 WebFrame* frame,
276 const WebPluginParams& params, 276 const WebPluginParams& params,
277 WebPlugin** plugin) { 277 WebPlugin** plugin) {
278 ChromeViewHostMsg_GetPluginInfo_Status status; 278 ChromeViewHostMsg_GetPluginInfo_Status status;
279 webkit::WebPluginInfo plugin_info; 279 webkit::WebPluginInfo plugin_info;
280 std::string actual_mime_type; 280 std::string actual_mime_type;
281 render_view->Send(new ChromeViewHostMsg_GetPluginInfo( 281 render_view->Send(new ChromeViewHostMsg_GetPluginInfo(
282 render_view->GetRoutingId(), GURL(params.url), 282 render_view->GetRoutingID(), GURL(params.url),
283 frame->top()->document().url(), params.mimeType.utf8(), 283 frame->top()->document().url(), params.mimeType.utf8(),
284 &status, &plugin_info, &actual_mime_type)); 284 &status, &plugin_info, &actual_mime_type));
285 *plugin = CreatePlugin(render_view, frame, params, 285 *plugin = CreatePlugin(render_view, frame, params,
286 status, plugin_info, actual_mime_type); 286 status, plugin_info, actual_mime_type);
287 return true; 287 return true;
288 } 288 }
289 289
290 webkit_media::WebMediaPlayerImpl* 290 webkit_media::WebMediaPlayerImpl*
291 ChromeContentRendererClient::OverrideCreateWebMediaPlayer( 291 ChromeContentRendererClient::OverrideCreateWebMediaPlayer(
292 content::RenderView* render_view, 292 content::RenderView* render_view,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 IDR_DISABLED_PLUGIN_HTML, IDS_PLUGIN_DISABLED); 430 IDR_DISABLED_PLUGIN_HTML, IDS_PLUGIN_DISABLED);
431 break; 431 break;
432 } 432 }
433 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: { 433 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked: {
434 #if defined(ENABLE_PLUGIN_INSTALLATION) 434 #if defined(ENABLE_PLUGIN_INSTALLATION)
435 placeholder = PluginPlaceholder::CreateBlockedPlugin( 435 placeholder = PluginPlaceholder::CreateBlockedPlugin(
436 render_view, frame, params, plugin, name, 436 render_view, frame, params, plugin, name,
437 IDR_BLOCKED_PLUGIN_HTML, IDS_PLUGIN_OUTDATED); 437 IDR_BLOCKED_PLUGIN_HTML, IDS_PLUGIN_OUTDATED);
438 placeholder->set_allow_loading(true); 438 placeholder->set_allow_loading(true);
439 render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin( 439 render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin(
440 render_view->GetRoutingId(), placeholder->CreateRoutingId(), 440 render_view->GetRoutingID(), placeholder->CreateRoutingId(),
441 group->identifier())); 441 group->identifier()));
442 #else 442 #else
443 NOTREACHED(); 443 NOTREACHED();
444 #endif 444 #endif
445 break; 445 break;
446 } 446 }
447 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedDisallowed: { 447 case ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedDisallowed: {
448 placeholder = PluginPlaceholder::CreateBlockedPlugin( 448 placeholder = PluginPlaceholder::CreateBlockedPlugin(
449 render_view, frame, params, plugin, name, 449 render_view, frame, params, plugin, name,
450 IDR_BLOCKED_PLUGIN_HTML, IDS_PLUGIN_OUTDATED); 450 IDR_BLOCKED_PLUGIN_HTML, IDS_PLUGIN_OUTDATED);
451 break; 451 break;
452 } 452 }
453 case ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized: { 453 case ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized: {
454 placeholder = PluginPlaceholder::CreateBlockedPlugin( 454 placeholder = PluginPlaceholder::CreateBlockedPlugin(
455 render_view, frame, params, plugin, name, 455 render_view, frame, params, plugin, name,
456 IDR_BLOCKED_PLUGIN_HTML, IDS_PLUGIN_NOT_AUTHORIZED); 456 IDR_BLOCKED_PLUGIN_HTML, IDS_PLUGIN_NOT_AUTHORIZED);
457 placeholder->set_allow_loading(true); 457 placeholder->set_allow_loading(true);
458 render_view->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin( 458 render_view->Send(new ChromeViewHostMsg_BlockedUnauthorizedPlugin(
459 render_view->GetRoutingId(), group->GetGroupName())); 459 render_view->GetRoutingID(), group->GetGroupName()));
460 break; 460 break;
461 } 461 }
462 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: { 462 case ChromeViewHostMsg_GetPluginInfo_Status::kClickToPlay: {
463 placeholder = PluginPlaceholder::CreateBlockedPlugin( 463 placeholder = PluginPlaceholder::CreateBlockedPlugin(
464 render_view, frame, params, plugin, name, 464 render_view, frame, params, plugin, name,
465 IDR_CLICK_TO_PLAY_PLUGIN_HTML, IDS_PLUGIN_LOAD); 465 IDR_CLICK_TO_PLAY_PLUGIN_HTML, IDS_PLUGIN_LOAD);
466 placeholder->set_allow_loading(true); 466 placeholder->set_allow_loading(true);
467 RenderThread::Get()->RecordUserMetrics("Plugin_ClickToPlay"); 467 RenderThread::Get()->RecordUserMetrics("Plugin_ClickToPlay");
468 observer->DidBlockContentType(content_type, group->identifier()); 468 observer->DidBlockContentType(content_type, group->identifier());
469 break; 469 break;
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 850 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
851 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 851 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
852 } 852 }
853 853
854 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 854 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
855 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 855 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
856 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 856 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
857 } 857 }
858 858
859 } // namespace chrome 859 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/visitedlink/visitedlink_event_listener.cc ('k') | chrome/renderer/chrome_ppb_pdf_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698