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

Side by Side Diff: content/browser/plugin_service_impl.cc

Issue 557893003: Stop using an atom to store plugin name/version on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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/browser/plugin_service_impl.h" 5 #include "content/browser/plugin_service_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 return false; 834 return false;
835 } 835 }
836 836
837 bool PluginServiceImpl::GetPluginInfoFromWindow( 837 bool PluginServiceImpl::GetPluginInfoFromWindow(
838 HWND window, 838 HWND window,
839 base::string16* plugin_name, 839 base::string16* plugin_name,
840 base::string16* plugin_version) { 840 base::string16* plugin_version) {
841 if (!IsPluginWindow(window)) 841 if (!IsPluginWindow(window))
842 return false; 842 return false;
843 843
844 GetPluginPropertyFromWindow( 844
845 window, kPluginNameAtomProperty, plugin_name); 845 DWORD process_id = 0;
846 GetPluginPropertyFromWindow( 846 GetWindowThreadProcessId(window, &process_id);
847 window, kPluginVersionAtomProperty, plugin_version); 847 WebPluginInfo info;
848 if (!PluginProcessHost::GetWebPluginInfoFromPluginPid(process_id, &info))
849 return false;
850
851 *plugin_name = info.name;
852 *plugin_version = info.version;
848 return true; 853 return true;
849 } 854 }
850 855
851 bool PluginServiceImpl::IsPluginWindow(HWND window) { 856 bool PluginServiceImpl::IsPluginWindow(HWND window) {
852 return gfx::GetClassName(window) == base::string16(kNativeWindowClassName); 857 return gfx::GetClassName(window) == base::string16(kNativeWindowClassName);
853 } 858 }
854 #endif 859 #endif
855 860
856 bool PluginServiceImpl::PpapiDevChannelSupported( 861 bool PluginServiceImpl::PpapiDevChannelSupported(
857 BrowserContext* browser_context, 862 BrowserContext* browser_context,
858 const GURL& document_url) { 863 const GURL& document_url) {
859 return content::GetContentClient()->browser()-> 864 return content::GetContentClient()->browser()->
860 IsPluginAllowedToUseDevChannelAPIs(browser_context, document_url); 865 IsPluginAllowedToUseDevChannelAPIs(browser_context, document_url);
861 } 866 }
862 867
863 } // namespace content 868 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_process_host.cc ('k') | content/child/npapi/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698