| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_FIND_PASTEBOARD_H_ | 5 #ifndef CONTENT_BROWSER_FIND_PASTEBOARD_H_ |
| 6 #define CONTENT_BROWSER_FIND_PASTEBOARD_H_ | 6 #define CONTENT_BROWSER_FIND_PASTEBOARD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 | 10 |
| 11 #ifdef __OBJC__ | 11 #ifdef __OBJC__ |
| 12 | 12 |
| 13 #import <Cocoa/Cocoa.h> | 13 #import <Cocoa/Cocoa.h> |
| 14 | 14 |
| 15 #include "base/memory/scoped_nsobject.h" | 15 #include "base/memory/scoped_nsobject.h" |
| 16 #include "content/common/content_export.h" |
| 16 | 17 |
| 17 extern NSString* kFindPasteboardChangedNotification; | 18 CONTENT_EXPORT extern NSString* kFindPasteboardChangedNotification; |
| 18 | 19 |
| 19 // Manages the find pasteboard. Use this to copy text to the find pasteboard, | 20 // Manages the find pasteboard. Use this to copy text to the find pasteboard, |
| 20 // to get the text currently on the find pasteboard, and to receive | 21 // to get the text currently on the find pasteboard, and to receive |
| 21 // notifications when the text on the find pasteboard has changed. You should | 22 // notifications when the text on the find pasteboard has changed. You should |
| 22 // always use this class instead of accessing | 23 // always use this class instead of accessing |
| 23 // [NSPasteboard pasteboardWithName:NSFindPboard] directly. | 24 // [NSPasteboard pasteboardWithName:NSFindPboard] directly. |
| 24 // | 25 // |
| 25 // This is not thread-safe and must be used on the main thread. | 26 // This is not thread-safe and must be used on the main thread. |
| 26 // | 27 // |
| 27 // This is supposed to be a singleton. | 28 // This is supposed to be a singleton. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 46 @interface FindPasteboard (TestingAPI) | 47 @interface FindPasteboard (TestingAPI) |
| 47 - (void)loadTextFromPasteboard:(NSNotification*)notification; | 48 - (void)loadTextFromPasteboard:(NSNotification*)notification; |
| 48 | 49 |
| 49 // This methods is meant to be overridden in tests. | 50 // This methods is meant to be overridden in tests. |
| 50 - (NSPasteboard*)findPboard; | 51 - (NSPasteboard*)findPboard; |
| 51 @end | 52 @end |
| 52 | 53 |
| 53 #endif // __OBJC__ | 54 #endif // __OBJC__ |
| 54 | 55 |
| 55 // Also provide a c++ interface | 56 // Also provide a c++ interface |
| 56 string16 GetFindPboardText(); | 57 CONTENT_EXPORT string16 GetFindPboardText(); |
| 57 | 58 |
| 58 #endif // CONTENT_BROWSER_FIND_PASTEBOARD_H_ | 59 #endif // CONTENT_BROWSER_FIND_PASTEBOARD_H_ |
| OLD | NEW |