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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 } | 574 } |
575 | 575 |
576 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, | 576 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, |
577 const WebPluginParams& params) { | 577 const WebPluginParams& params) { |
578 webkit::WebPluginInfo info; | 578 webkit::WebPluginInfo info; |
579 bool found; | 579 bool found; |
580 std::string mime_type; | 580 std::string mime_type; |
581 Send(new ViewHostMsg_GetPluginInfo( | 581 Send(new ViewHostMsg_GetPluginInfo( |
582 routing_id_, params.url, frame->top()->document().url(), | 582 routing_id_, params.url, frame->top()->document().url(), |
583 params.mimeType.utf8(), &found, &info, &mime_type)); | 583 params.mimeType.utf8(), &found, &info, &mime_type)); |
584 if (!found || !webkit::IsPluginEnabled(info)) | 584 if (!found) |
585 return NULL; | 585 return NULL; |
586 | 586 |
587 bool pepper_plugin_was_registered = false; | 587 bool pepper_plugin_was_registered = false; |
588 scoped_refptr<webkit::ppapi::PluginModule> pepper_module( | 588 scoped_refptr<webkit::ppapi::PluginModule> pepper_module( |
589 pepper_delegate_.CreatePepperPluginModule(info, | 589 pepper_delegate_.CreatePepperPluginModule(info, |
590 &pepper_plugin_was_registered)); | 590 &pepper_plugin_was_registered)); |
591 if (pepper_plugin_was_registered) { | 591 if (pepper_plugin_was_registered) { |
592 if (pepper_module) | 592 if (pepper_module) |
593 return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); | 593 return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); |
594 return NULL; | 594 return NULL; |
(...skipping 3985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4580 } | 4580 } |
4581 | 4581 |
4582 void RenderView::OnEnableViewSourceMode() { | 4582 void RenderView::OnEnableViewSourceMode() { |
4583 if (!webview()) | 4583 if (!webview()) |
4584 return; | 4584 return; |
4585 WebFrame* main_frame = webview()->mainFrame(); | 4585 WebFrame* main_frame = webview()->mainFrame(); |
4586 if (!main_frame) | 4586 if (!main_frame) |
4587 return; | 4587 return; |
4588 main_frame->enableViewSourceMode(true); | 4588 main_frame->enableViewSourceMode(true); |
4589 } | 4589 } |
OLD | NEW |