diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-20 17:21:30 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-20 17:21:30 +0000 |
commit | fd49e2d9c6b9a294297c4cc79868e43e71df67ae (patch) | |
tree | e43967aab2ac83ae99519688b890f20cd06b97f9 | |
parent | aa3c4f8994228ab5b134b42c50e152f69d036d90 (diff) | |
download | chromium_src-fd49e2d9c6b9a294297c4cc79868e43e71df67ae.zip chromium_src-fd49e2d9c6b9a294297c4cc79868e43e71df67ae.tar.gz chromium_src-fd49e2d9c6b9a294297c4cc79868e43e71df67ae.tar.bz2 |
Make plugin_service.cc compile on Posix.
Review URL: http://codereview.chromium.org/20531
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10102 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser.scons | 1 | ||||
-rw-r--r-- | chrome/browser/browser_main.cc | 2 | ||||
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 2 | ||||
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 2 | ||||
-rw-r--r-- | chrome/browser/metrics/metrics_service.cc | 2 | ||||
-rw-r--r-- | chrome/browser/plugin_service.cc | 10 | ||||
-rw-r--r-- | chrome/browser/plugin_service.h | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/resource_dispatcher_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/resource_message_filter.cc | 2 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 2 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 27 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 72 |
13 files changed, 68 insertions, 60 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index 22ca12f..b3fbc7f 100644 --- a/chrome/browser/browser.scons +++ b/chrome/browser/browser.scons @@ -718,7 +718,6 @@ if not env.Bit('windows'): 'password_manager/encryptor.cc', 'plugin_installer.cc', 'plugin_process_host.cc', - 'plugin_service.cc', 'printing/page_overlays.cc', 'printing/print_job.cc', 'printing/print_job_manager.cc', diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 2fc22bb..b1436fc 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -31,6 +31,7 @@ #include "chrome/browser/first_run.h" #include "chrome/browser/metrics/metrics_service.h" #include "chrome/browser/net/dns_global.h" +#include "chrome/browser/plugin_service.h" #include "chrome/browser/profile_manager.h" #include "chrome/browser/shell_integration.h" #include "chrome/browser/user_data_manager.h" @@ -74,7 +75,6 @@ #include "chrome/browser/net/dns_global.h" #include "chrome/browser/net/sdch_dictionary_fetcher.h" #include "chrome/browser/net/url_fixer_upper.h" -#include "chrome/browser/plugin_service.h" #include "chrome/browser/printing/print_job_manager.h" #include "chrome/browser/profile.h" #include "chrome/browser/profile_manager.h" diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 21bd96b..3f9749f 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -15,6 +15,7 @@ #include "chrome/browser/google_url_tracker.h" #include "chrome/browser/metrics/metrics_service.h" #include "chrome/browser/net/dns_global.h" +#include "chrome/browser/plugin_service.h" #include "chrome/browser/profile_manager.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" @@ -30,7 +31,6 @@ #include "chrome/browser/automation/automation_provider_list.h" #include "chrome/browser/download/download_file.h" #include "chrome/browser/icon_manager.h" -#include "chrome/browser/plugin_service.h" #include "chrome/browser/printing/print_job_manager.h" #include "chrome/common/clipboard_service.h" #include "chrome/views/accelerator_handler.h" diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index ef12384..933a1ea 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -16,6 +16,7 @@ #include "chrome/browser/first_run.h" #include "chrome/browser/jankometer.h" #include "chrome/browser/metrics/metrics_service.h" +#include "chrome/browser/plugin_service.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_widget_host.h" @@ -30,7 +31,6 @@ // TODO(port): Get rid of this section and finish porting. #if defined(OS_WIN) #include "chrome/browser/plugin_process_host.h" -#include "chrome/browser/plugin_service.h" #else #include "chrome/common/temp_scaffolding_stubs.h" #endif diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index 8f8e312..2906ef3 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -173,6 +173,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/load_notification_details.h" #include "chrome/browser/memory_details.h" +#include "chrome/browser/plugin_service.h" #include "chrome/browser/profile.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/search_engines/template_url.h" @@ -192,7 +193,6 @@ // TODO(port): Move these headers above as they are ported. #include "chrome/common/temp_scaffolding_stubs.h" #else -#include "chrome/browser/plugin_service.h" #include "chrome/installer/util/google_update_settings.h" #endif diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc index a0f7044..7889f79 100644 --- a/chrome/browser/plugin_service.cc +++ b/chrome/browser/plugin_service.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "build/build_config.h" + #include "chrome/browser/plugin_service.h" #include "base/command_line.h" @@ -9,7 +11,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_plugin_host.h" #include "chrome/browser/chrome_thread.h" -#include "chrome/browser/plugin_process_host.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/common/chrome_plugin_lib.h" @@ -17,6 +18,13 @@ #include "chrome/common/logging_chrome.h" #include "webkit/glue/plugins/plugin_list.h" +#if defined(OS_WIN) +// TODO(port): port this file and get rid of child_process_info.h include. +#include "chrome/browser/plugin_process_host.h" +#else +#include "chrome/common/child_process_info.h" +#endif + // static PluginService* PluginService::GetInstance() { return Singleton<PluginService>::get(); diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h index 66bd408..42c0cf6 100644 --- a/chrome/browser/plugin_service.h +++ b/chrome/browser/plugin_service.h @@ -101,7 +101,7 @@ class PluginService { void Shutdown(); private: - friend DefaultSingletonTraits<PluginService>; + friend struct DefaultSingletonTraits<PluginService>; // Creates the PluginService object, but doesn't actually build the plugin // list yet. It's generated lazily. diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index d17ab83..45e8b2a 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -27,6 +27,7 @@ #include "chrome/browser/cache_manager_host.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/history/history.h" +#include "chrome/browser/plugin_service.h" #include "chrome/browser/profile.h" #include "chrome/browser/renderer_host/render_widget_helper.h" #include "chrome/browser/renderer_host/renderer_security_policy.h" @@ -44,7 +45,6 @@ #include "chrome/renderer/render_process.h" #if defined(OS_WIN) -#include "chrome/browser/plugin_service.h" // TODO(port): see comment by the only usage of RenderViewHost in this file. #include "chrome/browser/renderer_host/render_view_host.h" diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index 0474b31..2aa4522 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -14,6 +14,7 @@ #include "chrome/browser/cert_store.h" #include "chrome/browser/cross_site_request_manager.h" #include "chrome/browser/download/save_file_manager.h" +#include "chrome/browser/plugin_service.h" #include "chrome/browser/renderer_host/async_resource_handler.h" #include "chrome/browser/renderer_host/buffered_resource_handler.h" #include "chrome/browser/renderer_host/cross_site_resource_handler.h" @@ -44,7 +45,6 @@ #include "chrome/browser/download/download_request_manager.h" #include "chrome/browser/external_protocol_handler.h" #include "chrome/browser/login_prompt.h" -#include "chrome/browser/plugin_service.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index 2215257..9cd52ef 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -12,6 +12,7 @@ #include "chrome/browser/chrome_plugin_browsing_context.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/net/dns_global.h" +#include "chrome/browser/plugin_service.h" #include "chrome/browser/profile.h" #include "chrome/browser/renderer_host/audio_renderer_host.h" #include "chrome/browser/renderer_host/browser_render_process_host.h" @@ -29,7 +30,6 @@ #include "webkit/glue/webplugin.h" #if defined(OS_WIN) -#include "chrome/browser/plugin_service.h" #include "chrome/browser/printing/print_job_manager.h" #include "chrome/browser/printing/printer_query.h" #include "chrome/browser/spellchecker.h" diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index bc2fa00..da00b86 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -75,6 +75,7 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 0A124E6F8B659427ABF96220 /* plugin_service.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF8E00E9D4839009A6919 /* plugin_service.cc */; }; 0D71821EDDA2629232DE3AD9 /* safe_browsing_blocking_page.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BFADB0E9D49DE009A6919 /* safe_browsing_blocking_page.cc */; }; 0ED14155E711F5BD0E6069ED /* user_data_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 622534301BD3F4A908D426D0 /* user_data_manager.cc */; }; 0EE123B79B750A2FCEFB4569 /* history_backend_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF9F00E9D48F7009A6919 /* history_backend_unittest.cc */; }; @@ -5495,6 +5496,7 @@ 4D7BFA280E9D490C009A6919 /* page_usage_data.cc in Sources */, E48B6C2C0F27840B002E47EC /* password_form_manager.cc in Sources */, EA8058FD371756B46906B157 /* password_manager.cc in Sources */, + 0A124E6F8B659427ABF96220 /* plugin_service.cc in Sources */, 826847800F2F69D1009F6555 /* profile.cc in Sources */, 8268477F0F2F69D1009F6555 /* profile_manager.cc in Sources */, BAA609ED0F3BCAA800783510 /* protocol_manager.cc in Sources */, diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index 6a1b9c3c..598c0b4 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -156,27 +156,6 @@ GURL NewTabUIURL() { //-------------------------------------------------------------------------- -PluginService* PluginService::GetInstance() { - return Singleton<PluginService>::get(); -} - -PluginService::PluginService() - : main_message_loop_(MessageLoop::current()), - resource_dispatcher_host_(NULL), - ui_locale_(g_browser_process->GetApplicationLocale()), - plugin_shutdown_handler_(NULL) { -} - -PluginService::~PluginService() { -} - -void PluginService::SetChromePluginDataDir(const FilePath& data_dir) { - AutoLock lock(lock_); - chrome_plugin_data_dir_ = data_dir; -} - -//-------------------------------------------------------------------------- - void InstallJankometer(const CommandLine&) { NOTIMPLEMENTED(); } @@ -529,3 +508,9 @@ bool NewTabUIHandleURL(GURL* url, NOTIMPLEMENTED(); return false; } + +CPBrowserFuncs* GetCPBrowserFuncsForBrowser() { + NOTIMPLEMENTED(); + return NULL; +} + diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index 8913a27..8f2adb8 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -9,6 +9,7 @@ // during the porting effort. It is not meant to be permanent, and classes will // be removed from here as they are fleshed out more completely. +#include <list> #include <string> #include "base/basictypes.h" @@ -39,6 +40,7 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_widget_host.h" #include "chrome/browser/renderer_host/render_view_host_delegate.h" +#include "chrome/common/child_process_info.h" #include "chrome/common/navigation_types.h" #include "chrome/common/notification_service.h" #include "chrome/common/page_transition_types.h" @@ -48,6 +50,7 @@ #include "net/base/load_states.h" #include "skia/include/SkBitmap.h" #include "webkit/glue/password_form.h" +#include "webkit/glue/webplugin.h" #include "webkit/glue/window_open_disposition.h" class Browser; @@ -89,7 +92,6 @@ class UserScriptMaster; class VisitedLinkMaster; class WebContents; class WebContentsView; -struct WebPluginInfo; struct WebPluginGeometry; class WebPreferences; @@ -633,44 +635,56 @@ class PluginInstaller { PluginInstaller(WebContents*) { } }; -class PluginService { +class ChildProcessHost : public ChildProcessInfo { public: - static PluginService* GetInstance(); - PluginService(); - ~PluginService(); - void LoadChromePlugins(ResourceDispatcherHost* rdh) { + class Iterator { + public: + explicit Iterator(ProcessType type) { NOTIMPLEMENTED(); } + ChildProcessInfo* operator->() { return *iterator_; } + ChildProcessInfo* operator*() { return *iterator_; } + ChildProcessInfo* operator++() { return NULL; } + bool Done() { + NOTIMPLEMENTED(); + return true; + } + private: + std::list<ChildProcessInfo*>::iterator iterator_; + }; + protected: + ChildProcessHost(ProcessType type, MessageLoop* main_message_loop) + : ChildProcessInfo(type) { NOTIMPLEMENTED(); } - bool HavePluginFor(const std::string& mime_type, bool allow_wildcard) { +}; + +class PluginProcessHost : public ChildProcessHost { + public: + explicit PluginProcessHost(MessageLoop* main_message_loop) + : ChildProcessHost(PLUGIN_PROCESS, main_message_loop) { NOTIMPLEMENTED(); - return true; } - void SetChromePluginDataDir(const FilePath& data_dir); - FilePath GetChromePluginDataDir() { return chrome_plugin_data_dir_; } - void GetPlugins(bool reload, std::vector<WebPluginInfo>* plugins) {} - FilePath GetPluginPath(const GURL& url, - const std::string& mime_type, - const std::string& clsid, - std::string* actual_mime_type) { + bool Init(const WebPluginInfo& info, + const std::string& activex_clsid, + const std::wstring& locale) { NOTIMPLEMENTED(); - return FilePath(); + return false; } - void OpenChannelToPlugin(ResourceMessageFilter* renderer_msg_filter, - const GURL& url, + void OpenChannelToPlugin(ResourceMessageFilter* renderer_message_filter, const std::string& mime_type, - const std::string& clsid, - const std::wstring& locale, - IPC::Message* reply_msg) { NOTIMPLEMENTED(); } + IPC::Message* reply_msg) { + NOTIMPLEMENTED(); + } + static void ReplyToRenderer(ResourceMessageFilter* renderer_message_filter, + const std::wstring& channel, + const FilePath& plugin_path, + IPC::Message* reply_msg) { + NOTIMPLEMENTED(); + } void Shutdown() { NOTIMPLEMENTED(); } + const WebPluginInfo& info() const { return info_; } private: - MessageLoop* main_message_loop_; - ResourceDispatcherHost* resource_dispatcher_host_; - FilePath chrome_plugin_data_dir_; - std::wstring ui_locale_; - Lock lock_; - class ShutdownHandler : public base::RefCountedThreadSafe<ShutdownHandler> { - }; - scoped_refptr<ShutdownHandler> plugin_shutdown_handler_; + WebPluginInfo info_; + DISALLOW_EVIL_CONSTRUCTORS(PluginProcessHost); }; class HungRendererWarning { |