Chrome
文章平均质量分 63
qinbaoan
这个作者很懒,什么都没留下…
展开
-
Timer
class BaseTimer_Helper { public: // Stops the timer. ~BaseTimer_Helper() { OrphanDelayedTask(); } // Returns true if the timer is running (i.e., not stopped). bool IsRunning原创 2009-05-31 16:24:00 · 535 阅读 · 0 评论 -
SysInfo
class SysInfo { public: // Return the number of logical processors/cores on the current machine. // WARNING: On POSIX, this method uses static variables and is not threadsafe // until it原创 2009-05-31 15:31:00 · 600 阅读 · 0 评论 -
StringPiece
class StringPiece { public: typedef size_t size_type; private: const char* ptr_; size_type length_; public: // We provide non-explicit singleton constructors so users c原创 2009-05-31 15:09:00 · 1849 阅读 · 0 评论 -
ScopedBstr
// Manages a BSTR string pointer.// The class interface is based on scoped_ptr.class ScopedBstr { public: ScopedBstr() : bstr_(NULL) { } // Constructor to create a new BSTR. //原创 2009-05-31 13:42:00 · 242 阅读 · 0 评论 -
ScopedHGlobal
templateclass ScopedHGlobal { public: explicit ScopedHGlobal(HGLOBAL glob) : glob_(glob) { data_ = static_cast(GlobalLock(glob_)); } ~ScopedHGlobal() { GlobalUnlock(glob_);原创 2009-05-31 11:54:00 · 213 阅读 · 0 评论 -
ScopedGDIObject
templateclass ScopedGDIObject { public: ScopedGDIObject() : object_(NULL) {} explicit ScopedGDIObject(T object) : object_(object) {} ~ScopedGDIObject() { Close(); } T原创 2009-05-31 11:53:00 · 215 阅读 · 0 评论 -
ScopedHandle
class ScopedHandle { public: ScopedHandle() : handle_(NULL) { } explicit ScopedHandle(HANDLE h) : handle_(NULL) { Set(h); } ~ScopedHandle() { Close(); } //原创 2009-05-31 11:50:00 · 444 阅读 · 0 评论 -
ScopedVector
// ScopedVector wraps a vector deleting the elements from its// destructor.template class ScopedVector { public: typedef typename std::vector::iterator iterator; typedef typename std:原创 2009-05-31 11:37:00 · 620 阅读 · 0 评论 -
ThreadLocalStorage
class ThreadLocalStorage { public: // Prototype for the TLS destructor function, which can be optionally used to // cleanup thread local storage on thread exit. value is the data that原创 2009-05-31 16:18:00 · 582 阅读 · 0 评论 -
SystemMonitor
class SystemMonitor { public: // Access to the Singleton static SystemMonitor* Get() { // Uses the LeakySingletonTrait because cleanup is optional. return Singleton >::get原创 2009-05-31 15:24:00 · 579 阅读 · 0 评论 -
StatsCounter
//------------------------------------------------------------------------------// StatsCounter represents a counter in the StatsTable class.class StatsCounter { public: // Create a StatsC原创 2009-05-31 15:00:00 · 428 阅读 · 0 评论 -
implicit_cast
templateinline To implicit_cast(From const &f) { return f;}原创 2009-05-31 09:38:00 · 1913 阅读 · 0 评论 -
ARRAY_SIZE
#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])原创 2009-05-31 09:49:00 · 273 阅读 · 0 评论 -
MD5
// These functions perform MD5 operations. The simplest call is MD5Sum to// generate the MD5 sum of the given data.//// You can also compute the MD5 sum of data incrementally by making multip原创 2009-05-31 10:00:00 · 270 阅读 · 0 评论 -
Time
class TimeDelta { public: TimeDelta() : delta_(0) { } // Converts units of time to TimeDeltas. static TimeDelta FromDays(int64 days); static TimeDelta FromHours(int64 hours);原创 2009-05-31 16:20:00 · 460 阅读 · 0 评论 -
StringTokenizerT
template class StringTokenizerT { public: typedef typename str::value_type char_type; // Options that may be pass to set_options() enum { // Specifies the delimiters should be r原创 2009-05-31 15:14:00 · 445 阅读 · 0 评论 -
SpinWait
#define SPIN_FOR_1_SECOND_OR_UNTIL_TRUE(expression) / SPIN_FOR_TIMEDELTA_OR_UNTIL_TRUE(base::TimeDelta::FromSeconds(1), / (expression)) #define SPIN_F原创 2009-05-31 14:34:00 · 315 阅读 · 0 评论 -
SharedMemory
// SharedMemoryHandle is a platform specific type which represents// the underlying OS handle to a shared memory segment.#if defined(OS_WIN)typedef HANDLE SharedMemoryHandle;typedef HANDLE S原创 2009-05-31 13:53:00 · 879 阅读 · 0 评论 -
RefCounted
class RefCountedBase { protected: RefCountedBase(); ~RefCountedBase(); void AddRef(); // Returns true if the object should self-delete. bool Release(); private: int re原创 2009-05-31 13:47:00 · 716 阅读 · 0 评论 -
ScopedComPtr
// Utility template to prevent users of ScopedComPtr from calling AddRef and/or// Release() without going through the ScopedComPtr class.template class BlockIUnknownMethods : public Interface原创 2009-05-31 13:37:00 · 381 阅读 · 0 评论 -
ScopedFindFileHandle
class ScopedFindFileHandle { public: explicit ScopedFindFileHandle(HANDLE handle) : handle_(handle) { // Windows is inconsistent about invalid handles, so we always use NULL if (handle_原创 2009-05-31 11:51:00 · 233 阅读 · 0 评论 -
ScopedStdioHandle
class ScopedStdioHandle { public: ScopedStdioHandle() : handle_(NULL) { } explicit ScopedStdioHandle(FILE* handle) : handle_(handle) { } ~ScopedStdioHandle() { Cl原创 2009-05-31 11:49:00 · 193 阅读 · 0 评论 -
ScopedTempDir
class ScopedTempDir { public: // No directory is owned/created initially. ScopedTempDir(); // Recursively delete path_ ~ScopedTempDir(); // Creates a unique directory in TempP原创 2009-05-31 11:42:00 · 598 阅读 · 0 评论 -
Singleton
// Default traits for Singleton. Calls operator new and operator delete on// the object. Registers automatic deletion at process exit.// Overload if you need arguments or another memory allocat原创 2009-05-31 14:15:00 · 529 阅读 · 0 评论 -
StackBstrT
// Template class to generate a BSTR from a static wide string// without touching the heap. Use this class via the StackBstrVar and// StackBstr macros.template class StackBstrT { public:原创 2009-05-31 13:43:00 · 215 阅读 · 0 评论 -
RefCountedThreadSafe
class RefCountedThreadSafeBase { protected: RefCountedThreadSafeBase(); ~RefCountedThreadSafeBase(); void AddRef(); // Returns true if the object should self-delete. bool Rele原创 2009-05-31 13:49:00 · 1447 阅读 · 0 评论 -
ScopedHDC
class ScopedHDC { public: ScopedHDC() : hdc_(NULL) { } explicit ScopedHDC(HDC h) : hdc_(h) { } ~ScopedHDC() { Close(); } HDC Get() { return hdc_; } void Set原创 2009-05-31 11:52:00 · 242 阅读 · 0 评论 -
scoped_ptr
template class scoped_ptr { public: // The element type typedef C element_type; // Constructor. Defaults to intializing with NULL. // There is no way to create an uninitializ原创 2009-05-31 11:44:00 · 314 阅读 · 0 评论 -
ViewAccessibility
MSAA IAccessible COM interface ViewAccessibilityWrapper是对ViewAccessibility的一个包装。原创 2009-05-28 12:53:00 · 206 阅读 · 0 评论 -
views::RepeatController
base::OneShotTimer timer_; 定时器的原理是PostDelayedTask,实现定时。原创 2009-05-28 11:37:00 · 202 阅读 · 0 评论 -
drag_utils
namespace drag_utils {// Sets url and title on data as well as setting a suitable image for dragging.// The image looks like that of the bookmark buttons.void SetURLAndDragImage(const GURL& url,原创 2009-05-28 12:10:00 · 299 阅读 · 0 评论 -
views::Painter
原创 2009-05-28 12:48:00 · 215 阅读 · 0 评论 -
views::Background
class Background { public: Background(); virtual ~Background(); // Creates a background that fills the canvas in the specified color. static Background* CreateSolidBackground(const SkColor& col原创 2009-05-28 11:48:00 · 290 阅读 · 0 评论 -
views::LayoutManager
用于布局View中下面的子View。1、FillLayout 全扩充2、GridLayout网格布局原创 2009-05-28 12:42:00 · 196 阅读 · 0 评论 -
views::Event
原创 2009-05-28 12:16:00 · 189 阅读 · 0 评论 -
DelegateSimpleThread
class SimpleThread : public PlatformThread::Delegate { public: class Options { public: Options() : stack_size_(0) { } ~Options() { } // We use the standard compiler-suppl原创 2009-05-31 14:04:00 · 338 阅读 · 0 评论 -
DelegateSimpleThreadPool
class DelegateSimpleThreadPool : public DelegateSimpleThread::Delegate { public: typedef DelegateSimpleThread::Delegate Delegate; DelegateSimpleThreadPool(const std::string name_prefix, i原创 2009-05-31 14:10:00 · 503 阅读 · 0 评论 -
StackContainer
templateclass StackAllocator : public std::allocator { public: typedef typename std::allocator::pointer pointer; typedef typename std::allocator::size_type size_type; // Backing stor原创 2009-05-31 14:51:00 · 451 阅读 · 0 评论 -
ScopedClipboardWriter
// This class is a wrapper for |Clipboard| that handles packing data// into a Clipboard::ObjectMap.// NB: You should probably NOT be using this class if you include// webkit_glue.h. Use Scoped原创 2009-05-31 13:39:00 · 230 阅读 · 0 评论 -
scoped_ptr_malloc
templateclass scoped_ptr_malloc { public: // The element type typedef C element_type; // Constructor. Defaults to intializing with NULL. // There is no way to create an uninit原创 2009-05-31 11:47:00 · 337 阅读 · 0 评论