diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-14 20:16:41 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-14 20:16:41 +0000 |
commit | 8aee8ed355ca551f7c401ea5877cf48d2739237f (patch) | |
tree | b96f2dfada42d172dec44841d29b7a979f60215c /content/browser/find_pasteboard.h | |
parent | e29f175428c78088be80ab50de9a2ff93d9b69a3 (diff) | |
download | chromium_src-8aee8ed355ca551f7c401ea5877cf48d2739237f.zip chromium_src-8aee8ed355ca551f7c401ea5877cf48d2739237f.tar.gz chromium_src-8aee8ed355ca551f7c401ea5877cf48d2739237f.tar.bz2 |
Remove most of the remaining test dependencies (other than chrome/test).
I moved FindPasteboard since it seemed like a core dependency of the clipboard APIs. I left its test behind because I didn't think we'd want to move cocoa_test_helper.h to content?
I moved all the testing URLRequestObjects to content, since we'll want to have stuff like that for content tests.
BUG=76697
Review URL: http://codereview.chromium.org/7149013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89063 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/find_pasteboard.h')
-rw-r--r-- | content/browser/find_pasteboard.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/content/browser/find_pasteboard.h b/content/browser/find_pasteboard.h new file mode 100644 index 0000000..9369ba6 --- /dev/null +++ b/content/browser/find_pasteboard.h @@ -0,0 +1,58 @@ +// Copyright (c) 2011 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. + +#ifndef CONTENT_BROWSER_FIND_PASTEBOARD_H_ +#define CONTENT_BROWSER_FIND_PASTEBOARD_H_ +#pragma once + +#include "base/string16.h" + +#ifdef __OBJC__ + +#import <Cocoa/Cocoa.h> + +#include "base/memory/scoped_nsobject.h" + +extern NSString* kFindPasteboardChangedNotification; + +// Manages the find pasteboard. Use this to copy text to the find pasteboard, +// to get the text currently on the find pasteboard, and to receive +// notifications when the text on the find pasteboard has changed. You should +// always use this class instead of accessing +// [NSPasteboard pasteboardWithName:NSFindPboard] directly. +// +// This is not thread-safe and must be used on the main thread. +// +// This is supposed to be a singleton. +@interface FindPasteboard : NSObject { + @private + scoped_nsobject<NSString> findText_; +} + +// Returns the singleton instance of this class. ++ (FindPasteboard*)sharedInstance; + +// Returns the current find text. This is never nil; if there is no text on the +// find pasteboard, this returns an empty string. +- (NSString*)findText; + +// Sets the current find text to |newText| and sends a +// |kFindPasteboardChangedNotification| to the default notification center if +// it the new text different from the current text. |newText| must not be nil. +- (void)setFindText:(NSString*)newText; +@end + +@interface FindPasteboard (TestingAPI) +- (void)loadTextFromPasteboard:(NSNotification*)notification; + +// This methods is meant to be overridden in tests. +- (NSPasteboard*)findPboard; +@end + +#endif // __OBJC__ + +// Also provide a c++ interface +string16 GetFindPboardText(); + +#endif // CONTENT_BROWSER_FIND_PASTEBOARD_H_ |