OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 2656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2667 } | 2667 } |
2668 } | 2668 } |
2669 // Check for Native Client modules. | 2669 // Check for Native Client modules. |
2670 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalNaCl)) { | 2670 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalNaCl)) { |
2671 if (mime_type == "application/x-nacl-srpc") { | 2671 if (mime_type == "application/x-nacl-srpc") { |
2672 in_process_plugin = true; | 2672 in_process_plugin = true; |
2673 use_pepper_host = true; | 2673 use_pepper_host = true; |
2674 } | 2674 } |
2675 } | 2675 } |
2676 if (in_process_plugin) { | 2676 if (in_process_plugin) { |
2677 #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. | |
2678 if (use_pepper_host) { | 2677 if (use_pepper_host) { |
2679 return WebPluginDelegatePepper::Create( | 2678 return WebPluginDelegatePepper::Create( |
2680 path, | 2679 path, |
2681 *mime_type_to_use, | 2680 *mime_type_to_use, |
2682 AsWeakPtr(), | 2681 AsWeakPtr(), |
2683 gfx::NativeViewFromId(host_window_)); | 2682 0); |
2684 } else { | 2683 } else { |
| 2684 #if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac. |
2685 return WebPluginDelegateImpl::Create( | 2685 return WebPluginDelegateImpl::Create( |
2686 path, *mime_type_to_use, gfx::NativeViewFromId(host_window_)); | 2686 path, *mime_type_to_use, gfx::NativeViewFromId(host_window_)); |
| 2687 #else |
| 2688 NOTIMPLEMENTED(); |
| 2689 return NULL; |
| 2690 #endif |
2687 } | 2691 } |
2688 #else | |
2689 NOTIMPLEMENTED(); | |
2690 return NULL; | |
2691 #endif | |
2692 } | 2692 } |
2693 | 2693 |
2694 return new WebPluginDelegateProxy(*mime_type_to_use, AsWeakPtr()); | 2694 return new WebPluginDelegateProxy(*mime_type_to_use, AsWeakPtr()); |
2695 } | 2695 } |
2696 | 2696 |
2697 void RenderView::CreatedPluginWindow(gfx::PluginWindowHandle window) { | 2697 void RenderView::CreatedPluginWindow(gfx::PluginWindowHandle window) { |
2698 #if defined(OS_LINUX) | 2698 #if defined(OS_LINUX) |
2699 RenderThread::current()->Send(new ViewHostMsg_CreatePluginContainer( | 2699 RenderThread::current()->Send(new ViewHostMsg_CreatePluginContainer( |
2700 routing_id(), window)); | 2700 routing_id(), window)); |
2701 #endif | 2701 #endif |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3929 new PluginMsg_SignalModalDialogEvent(host_window_)); | 3929 new PluginMsg_SignalModalDialogEvent(host_window_)); |
3930 | 3930 |
3931 message->EnableMessagePumping(); // Runs a nested message loop. | 3931 message->EnableMessagePumping(); // Runs a nested message loop. |
3932 bool rv = Send(message); | 3932 bool rv = Send(message); |
3933 | 3933 |
3934 PluginChannelHost::Broadcast( | 3934 PluginChannelHost::Broadcast( |
3935 new PluginMsg_ResetModalDialogEvent(host_window_)); | 3935 new PluginMsg_ResetModalDialogEvent(host_window_)); |
3936 | 3936 |
3937 return rv; | 3937 return rv; |
3938 } | 3938 } |
OLD | NEW |