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

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

Issue 524051: Revert 35649 - Make Pepper plugins work on Linux.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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
« no previous file with comments | « build/all.gyp ('k') | chrome/renderer/webplugin_delegate_pepper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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
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.
2677 if (use_pepper_host) { 2678 if (use_pepper_host) {
2678 return WebPluginDelegatePepper::Create( 2679 return WebPluginDelegatePepper::Create(
2679 path, 2680 path,
2680 *mime_type_to_use, 2681 *mime_type_to_use,
2681 AsWeakPtr(), 2682 AsWeakPtr(),
2682 0); 2683 gfx::NativeViewFromId(host_window_));
2683 } else { 2684 } 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 }
2687 #else 2688 #else
2688 NOTIMPLEMENTED(); 2689 NOTIMPLEMENTED();
2689 return NULL; 2690 return NULL;
2690 #endif 2691 #endif
2691 }
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
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 }
OLDNEW
« no previous file with comments | « build/all.gyp ('k') | chrome/renderer/webplugin_delegate_pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698