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

Side by Side Diff: content/child/npapi/plugin_host.cc

Issue 234533002: Remove a bunch of TOOLKIT_GTK in content/ and gpu/, as well as NPAPI plugins on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, skip changing browser_main_loop.cc because of presubmit issues, will follow up Created 6 years, 8 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 | « content/browser/webui/web_ui_impl.cc ('k') | content/child/npapi/webplugin_delegate_impl.h » ('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) 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 "content/child/npapi/plugin_host.h" 5 #include "content/child/npapi/plugin_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 rv = NPERR_NO_ERROR; 735 rv = NPERR_NO_ERROR;
736 break; 736 break;
737 } 737 }
738 #endif 738 #endif
739 case NPNVjavascriptEnabledBool: { 739 case NPNVjavascriptEnabledBool: {
740 // yes, JS is enabled. 740 // yes, JS is enabled.
741 *((void**)value) = (void*)1; 741 *((void**)value) = (void*)1;
742 rv = NPERR_NO_ERROR; 742 rv = NPERR_NO_ERROR;
743 break; 743 break;
744 } 744 }
745 #if defined(TOOLKIT_GTK)
746 case NPNVToolkit:
747 // Tell them we are GTK2. (The alternative is GTK 1.2.)
748 *reinterpret_cast<int*>(value) = NPNVGtk2;
749 rv = NPERR_NO_ERROR;
750 break;
751
752 case NPNVSupportsXEmbedBool:
753 *reinterpret_cast<NPBool*>(value) = true;
754 rv = NPERR_NO_ERROR;
755 break;
756 #endif
757 case NPNVSupportsWindowless: { 745 case NPNVSupportsWindowless: {
758 NPBool* supports_windowless = reinterpret_cast<NPBool*>(value); 746 NPBool* supports_windowless = reinterpret_cast<NPBool*>(value);
759 *supports_windowless = true; 747 *supports_windowless = true;
760 rv = NPERR_NO_ERROR; 748 rv = NPERR_NO_ERROR;
761 break; 749 break;
762 } 750 }
763 case NPNVprivateModeBool: { 751 case NPNVprivateModeBool: {
764 NPBool* private_mode = reinterpret_cast<NPBool*>(value); 752 NPBool* private_mode = reinterpret_cast<NPBool*>(value);
765 scoped_refptr<PluginInstance> plugin(FindInstance(id)); 753 scoped_refptr<PluginInstance> plugin(FindInstance(id));
766 if (!plugin.get()) { 754 if (!plugin.get()) {
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 } 1094 }
1107 1095
1108 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) { 1096 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) {
1109 scoped_refptr<PluginInstance> plugin(FindInstance(instance)); 1097 scoped_refptr<PluginInstance> plugin(FindInstance(instance));
1110 if (plugin.get()) { 1098 if (plugin.get()) {
1111 plugin->URLRedirectResponse(!!allow, notify_data); 1099 plugin->URLRedirectResponse(!!allow, notify_data);
1112 } 1100 }
1113 } 1101 }
1114 1102
1115 } // extern "C" 1103 } // extern "C"
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_impl.cc ('k') | content/child/npapi/webplugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698