<commit_before>// Copyright (c) 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 "config.h"
#include "webkit/glue/webkit_glue.h"

#import <AppKit/NSGraphics.h>
#import <Foundation/NSGeometry.h>

namespace webkit_glue {

static NSScreen *ScreenForWindow(NSWindow *window) {
  NSScreen *screen = [window screen];  // nil if the window is off-screen
  if (screen)
    return screen;

  NSArray *screens = [NSScreen screens];
  if ([screens count] > 0)
    return [screens objectAtIndex:0];  // screen containing the menubar

  return nil;
}

static gfx::Rect ToUserSpace(const NSRect& rect, NSWindow *destination) {
  CGRect user_rect = NSRectToCGRect(rect);
<commit_msg>Include what you use in webkit_glue_mac.mm.  I really should have waited to accumulate all of these together, but I think this is the last one in glue. Review URL: http://codereview.chromium.org/21470<commit_after>// Copyright (c) 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 "config.h"

#include "webkit/glue/webkit_glue.h"

#import <AppKit/AppKit.h>

namespace webkit_glue {

static NSScreen *ScreenForWindow(NSWindow *window) {
  NSScreen *screen = [window screen];  // nil if the window is off-screen
  if (screen)
    return screen;

  NSArray *screens = [NSScreen screens];
  if ([screens count] > 0)
    return [screens objectAtIndex:0];  // screen containing the menubar

  return nil;
}

static gfx::Rect ToUserSpace(const NSRect& rect, NSWindow *destination) {
  CGRect user_rect = NSRectToCGRect(rect);

{'fraction_non_alphanumeric': 0.09918319719953325, 'fraction_numerical': 0.009918319719953326, 'mean_word_length': 4.134730538922156, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '4488380', 'n_tokens_mistral': 575, 'n_tokens_neox': 541, 'n_words': 195}