Chromium Code Reviews| Index: ui/gfx/screen.h |
| =================================================================== |
| --- ui/gfx/screen.h (revision 120215) |
| +++ ui/gfx/screen.h (working copy) |
| @@ -65,6 +65,16 @@ |
| // number of distinct, usable displays. |
| static int GetNumMonitors(); |
| +#if defined(OS_WIN) |
|
sky
2012/02/03 18:34:06
I don't like defining this here. Move it into it's
|
| + // Returns a device context compatible with the screen. The context can be |
| + // used as a temporary context on the UI thread. |
| + static HDC GetCompatibleDC(); |
| + |
| + // Should be called on WM_DISPLAYCHANGE to release the cached compatible |
| + // device context, if any. |
| + static void ReleaseCompatibleDC(); |
| +#endif |
| + |
| protected: |
| virtual gfx::Point GetCursorScreenPointImpl() = 0; |
| virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl( |
| @@ -83,6 +93,11 @@ |
| // The singleton screen instance. Only used on aura. |
| static Screen* instance_; |
| #endif |
| + |
| +#if defined(OS_WIN) |
| + // Cached device context compatible with the screen. |
| + static HDC compatible_dc_; |
| +#endif |
| }; |
| } // namespace gfx |