diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 20:40:48 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-29 20:40:48 +0000 |
commit | f7f181f5b4b4cfa8d4882cccb3e349458084dbf6 (patch) | |
tree | fcb7074b4d754ae1f83fc6d2da42954662cb611f /chrome/renderer/renderer_glue.cc | |
parent | 94f957511b1a940454516a43acb730350fc6cad8 (diff) | |
download | chromium_src-f7f181f5b4b4cfa8d4882cccb3e349458084dbf6.zip chromium_src-f7f181f5b4b4cfa8d4882cccb3e349458084dbf6.tar.gz chromium_src-f7f181f5b4b4cfa8d4882cccb3e349458084dbf6.tar.bz2 |
Fix our link madness on linux. We now properly link
webkit into unit_tests.
There was also a problem with simple_clipboard_impl.cc which should only be
compiled into test_shell.
I can't remove mock_webkit_glue.cc until I verify that the mac build doesn't
need it anymore.
Review URL: http://codereview.chromium.org/19474
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_glue.cc')
-rw-r--r-- | chrome/renderer/renderer_glue.cc | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index d31fa6a..3bd9edf 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -4,6 +4,8 @@ // This file provides the embedder's side of random webkit glue functions. +#include "build/build_config.h" + #if defined(OS_WIN) #include <windows.h> #include <wininet.h> @@ -13,7 +15,6 @@ #include "base/command_line.h" #include "base/scoped_clipboard_writer.h" #include "base/string_util.h" -#include "build/build_config.h" #include "chrome/renderer/net/render_dns_master.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/resource_bundle.h" @@ -162,9 +163,14 @@ void AppendToLog(const char* file, int line, const char* msg) { } bool GetMimeTypeFromExtension(const std::wstring &ext, - std::string *mime_type) { + std::string *mime_type) { +#if defined(OS_WIN) + // TODO(port): Need to define IsPluginProcess. if (IsPluginProcess()) return net::GetMimeTypeFromExtension(ext, mime_type); +#else + NOTIMPLEMENTED(); +#endif // The sandbox restricts our access to the registry, so we need to proxy // these calls over to the browser process. @@ -175,9 +181,14 @@ bool GetMimeTypeFromExtension(const std::wstring &ext, } bool GetMimeTypeFromFile(const std::wstring &file_path, - std::string *mime_type) { + std::string *mime_type) { +#if defined(OS_WIN) + // TODO(port): Need to define IsPluginProcess. if (IsPluginProcess()) return net::GetMimeTypeFromFile(file_path, mime_type); +#else + NOTIMPLEMENTED(); +#endif // The sandbox restricts our access to the registry, so we need to proxy // these calls over to the browser process. @@ -188,9 +199,14 @@ bool GetMimeTypeFromFile(const std::wstring &file_path, } bool GetPreferredExtensionForMimeType(const std::string& mime_type, - std::wstring* ext) { + std::wstring* ext) { +#if defined(OS_WIN) + // TODO(port): Need to define IsPluginProcess. if (IsPluginProcess()) return net::GetPreferredExtensionForMimeType(mime_type, ext); +#else + NOTIMPLEMENTED(); +#endif // The sandbox restricts our access to the registry, so we need to proxy // these calls over to the browser process. @@ -200,15 +216,21 @@ bool GetPreferredExtensionForMimeType(const std::string& mime_type, return !ext->empty(); } +// TODO(port): Need to finish port ResourceBundle. std::string GetDataResource(int resource_id) { +#if defined(OS_WIN) return ResourceBundle::GetSharedInstance().GetDataResource(resource_id); +#else + NOTIMPLEMENTED(); + return std::string(); +#endif } +#if defined(OS_WIN) SkBitmap* GetBitmapResource(int resource_id) { return ResourceBundle::GetSharedInstance().GetBitmapNamed(resource_id); } -#if defined(OS_WIN) HCURSOR LoadCursor(int cursor_id) { return ResourceBundle::GetSharedInstance().LoadCursor(cursor_id); } @@ -220,6 +242,16 @@ Clipboard* ClipboardGetClipboard(){ return NULL; } +#if defined(OS_LINUX) +// TODO(port): This should replace the method below (the unsigned int is a +// windows type). We may need to convert the type of format so it can be sent +// over IPC. +bool ClipboardIsFormatAvailable(Clipboard::FormatType format) { + NOTIMPLEMENTED(); + return false; +} +#endif + bool ClipboardIsFormatAvailable(unsigned int format) { bool result; g_render_thread->Send( |