<commit_before>// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "webkit/glue/webkit_glue.h"

#include <string>

#include "base/clipboard.h"
#include "base/lazy_instance.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h"

#include "SkBitmap.h"

// Clipboard glue

void ScopedClipboardWriterGlue::WriteBitmapFromPixels(
    const void* pixels, const gfx::Size& size) {
  ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size);
}

ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() {
}

namespace webkit_glue {

base::LazyInstance<Clipboard> clipboard(base::LINKER_INITIALIZED);

Clipboard* ClipboardGetClipboard() {
  return clipboard.Pointer();
}

bool ClipboardIsFormatAvailable(Clipboard::FormatType format) {
  return ClipboardGetClipboard()->IsFormatAvailable(format);
}

void ClipboardReadText(std::wstring* result) {
  ClipboardGetClipboard()->ReadText(result);
}

void ClipboardReadAsciiText(std::string* result) {
  ClipboardGetClipboard()->ReadAsciiText(result);
}

void ClipboardReadHTML(std::wstring* markup, GURL* url) {
  std::string url_str;
  ClipboardGetClipboard()->ReadHTML(markup, url ? &url_str : NULL);<commit_msg>fix mac build<commit_after>// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "webkit/glue/webkit_glue.h"

#include <string>

#include "base/clipboard.h"
#include "base/lazy_instance.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h"

#include "SkBitmap.h"

// Clipboard glue

#if defined(OS_WIN)
void ScopedClipboardWriterGlue::WriteBitmapFromPixels(
    const void* pixels, const gfx::Size& size) {
  ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size);
}
#endif

ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() {
}

namespace webkit_glue {

base::LazyInstance<Clipboard> clipboard(base::LINKER_INITIALIZED);

Clipboard* ClipboardGetClipboard() {
  return clipboard.Pointer();
}

bool ClipboardIsFormatAvailable(Clipboard::FormatType format) {
  return ClipboardGetClipboard()->IsFormatAvailable(format);
}

void ClipboardReadText(std::wstring* result) {
  ClipboardGetClipboard()->ReadText(result);
}

void ClipboardReadAsciiText(std::string* result) {
  ClipboardGetClipboard()->ReadAsciiText(result);
}

void ClipboardReadHTML(std::wstring* markup, GURL* url) {
  std::string url_str;
  ClipboardGetClipboard()->ReadHTML(markup, url ? &url_str : NULL);
{'fraction_non_alphanumeric': 0.12109815720195562, 'fraction_numerical': 0.006017299736743136, 'mean_word_length': 6.687861271676301, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1770139', 'n_tokens_mistral': 933, 'n_tokens_neox': 898, 'n_words': 180}