- Update to Chromium revision 85305.

- Use the angle library for GL support (issue #136).
- Add a workaround for the SyncRequestProxy deadlock problem (issue #192).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@233 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-05-16 16:56:12 +00:00
parent 2c0f941830
commit abfc77abd1
30 changed files with 256 additions and 173 deletions

View File

@ -7,10 +7,14 @@
#include <string>
#include "base/lazy_instance.h"
#include "base/stl_util-inl.h"
#include "base/string16.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/zlib/zlib.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/size.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h"
// Clipboard glue
@ -36,6 +40,13 @@ bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format,
return ClipboardGetClipboard()->IsFormatAvailable(format, buffer);
}
// TODO(dcheng): Implement.
void ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer,
std::vector<string16>* types,
bool* contains_filenames) {
return;
}
void ClipboardReadText(ui::Clipboard::Buffer buffer, string16* result) {
ClipboardGetClipboard()->ReadText(buffer, result);
}
@ -52,15 +63,25 @@ void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup,
*url = GURL(url_str);
}
// TODO(dcheng): Implement.
void ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer,
std::vector<string16>* types,
bool* contains_filenames) {
return;
}
void ClipboardReadImage(ui::Clipboard::Buffer buffer, std::string* data) {
ClipboardGetClipboard()->ReadImage(buffer, data);
SkBitmap bitmap = ClipboardGetClipboard()->ReadImage(buffer);
if (bitmap.isNull())
return;
std::vector<unsigned char> png_data;
SkAutoLockPixels lock(bitmap);
if (gfx::PNGCodec::EncodeWithCompressionLevel(
static_cast<const unsigned char*>(bitmap.getPixels()),
gfx::PNGCodec::FORMAT_BGRA,
gfx::Size(bitmap.width(), bitmap.height()),
bitmap.rowBytes(),
false,
std::vector<gfx::PNGCodec::Comment>(),
Z_BEST_SPEED,
&png_data)) {
data->assign(reinterpret_cast<char*>(vector_as_array(&png_data)),
png_data.size());
}
}
bool ClipboardReadData(ui::Clipboard::Buffer buffer, const string16& type,