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

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

Issue 6259008: When we detect a PDF with an unsupported feature, ask the user if they want t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 "chrome/renderer/render_view.h" 5 #include "chrome/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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 Send(new ViewHostMsg_CrashedPlugin(routing_id_, plugin_path)); 911 Send(new ViewHostMsg_CrashedPlugin(routing_id_, plugin_path));
912 } 912 }
913 913
914 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, 914 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame,
915 const WebPluginParams& params) { 915 const WebPluginParams& params) {
916 webkit::npapi::WebPluginInfo info; 916 webkit::npapi::WebPluginInfo info;
917 bool found; 917 bool found;
918 ContentSetting setting; 918 ContentSetting setting;
919 std::string mime_type; 919 std::string mime_type;
920 Send(new ViewHostMsg_GetPluginInfo( 920 Send(new ViewHostMsg_GetPluginInfo(
921 params.url, frame->top()->url(), params.mimeType.utf8(), &found, 921 routing_id_, params.url, frame->top()->url(), params.mimeType.utf8(),
922 &info, &setting, &mime_type)); 922 &found, &info, &setting, &mime_type));
923 if (!found || !info.enabled) 923 if (!found || !info.enabled)
924 return NULL; 924 return NULL;
925 925
926 scoped_refptr<webkit::ppapi::PluginModule> pepper_module( 926 scoped_refptr<webkit::ppapi::PluginModule> pepper_module(
927 pepper_delegate_.CreatePepperPlugin(info.path)); 927 pepper_delegate_.CreatePepperPlugin(info.path));
928 if (pepper_module) 928 if (pepper_module)
929 return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); 929 return CreatePepperPlugin(frame, params, info.path, pepper_module.get());
930 return CreateNPAPIPlugin(frame, params, info.path, mime_type); 930 return CreateNPAPIPlugin(frame, params, info.path, mime_type);
931 } 931 }
932 932
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 // WebKit::WebFrameClient ----------------------------------------------------- 2677 // WebKit::WebFrameClient -----------------------------------------------------
2678 2678
2679 WebPlugin* RenderView::createPlugin(WebFrame* frame, 2679 WebPlugin* RenderView::createPlugin(WebFrame* frame,
2680 const WebPluginParams& params) { 2680 const WebPluginParams& params) {
2681 bool found = false; 2681 bool found = false;
2682 ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT; 2682 ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT;
2683 CommandLine* cmd = CommandLine::ForCurrentProcess(); 2683 CommandLine* cmd = CommandLine::ForCurrentProcess();
2684 webkit::npapi::WebPluginInfo info; 2684 webkit::npapi::WebPluginInfo info;
2685 GURL url(params.url); 2685 GURL url(params.url);
2686 std::string actual_mime_type; 2686 std::string actual_mime_type;
2687 Send(new ViewHostMsg_GetPluginInfo(url, 2687 Send(new ViewHostMsg_GetPluginInfo(routing_id_,
2688 url,
2688 frame->top()->url(), 2689 frame->top()->url(),
2689 params.mimeType.utf8(), 2690 params.mimeType.utf8(),
2690 &found, 2691 &found,
2691 &info, 2692 &info,
2692 &plugin_setting, 2693 &plugin_setting,
2693 &actual_mime_type)); 2694 &actual_mime_type));
2694 2695
2695 if (!found) 2696 if (!found)
2696 return NULL; 2697 return NULL;
2697 DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT); 2698 DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT);
(...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after
5693 if (cmd == kJavaScriptStressTestSetStressRunType) { 5694 if (cmd == kJavaScriptStressTestSetStressRunType) {
5694 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param)); 5695 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param));
5695 } else if (cmd == kJavaScriptStressTestPrepareStressRun) { 5696 } else if (cmd == kJavaScriptStressTestPrepareStressRun) {
5696 v8::Testing::PrepareStressRun(param); 5697 v8::Testing::PrepareStressRun(param);
5697 } 5698 }
5698 } 5699 }
5699 5700
5700 void RenderView::OnContextMenuClosed() { 5701 void RenderView::OnContextMenuClosed() {
5701 context_menu_node_.reset(); 5702 context_menu_node_.reset();
5702 } 5703 }
OLDNEW
« no previous file with comments | « chrome/renderer/pepper_plugin_delegate_impl.cc ('k') | chrome/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698