summaryrefslogtreecommitdiffstats
path: root/remoting/client/rectangle_update_decoder.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add VideoProcessor interface.sergeyu@chromium.org2014-01-231-349/+0
| | | | | | | | | | | | | The new VideoProcessor interface abstracts video layer in chromoting client. RectangleUpdateDecoder is the default implementation. Another implementation will be added to suppord decoding using <video> and MediaSource API (or Pepper video decode API if we decide to use it instead in the future). BUG=321825 Review URL: https://codereview.chromium.org/136763009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246547 0039d316-1c4b-4281-b951-d872f2087c98
* Add VP9 decode support to the remoting client.wez@chromium.org2013-10-221-0/+2
| | | | | | | | BUG=260879 Review URL: https://codereview.chromium.org/26921005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230003 0039d316-1c4b-4281-b951-d872f2087c98
* Move VideoDecoderVp8 to VideoDecoderVpx base that will support VP8/9.wez@chromium.org2013-10-191-3/+3
| | | | | | | | BUG=260879 Review URL: https://codereview.chromium.org/26888009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229624 0039d316-1c4b-4281-b951-d872f2087c98
* Byte-swap the video frame pixels before passing them to Java.lambroslambrou@chromium.org2013-10-021-0/+63
| | | | | | | | | | When a complete video frame is decoded, this CL converts the pixels from BGRA to a format suitable for loading into a Java Bitmap directly. This removes the need to create a temporary int[] array in Java. Review URL: https://codereview.chromium.org/23677011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226405 0039d316-1c4b-4281-b951-d872f2087c98
* Remove dependency on Skia from chromoting client.sergeyu@chromium.org2013-09-251-24/+22
| | | | | | | | | | | | | | Now DesktopRegion, DesktopRect and DesktopSize are used instead of corresponding skia types. R=alexeypa@chromium.org TBR=reed@google.com (for _moved_ skia dependency) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=224101 Review URL: https://codereview.chromium.org/23440046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225265 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup VideoDecoder interface.lambroslambrou@chromium.org2013-09-231-7/+4
| | | | | | | | This removes some un-needed methods and the DecodeResult enumeration. Review URL: https://chromiumcodereview.appspot.com/23702056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224762 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 224101 "Remove dependency on Skia from chromoting client."sergeyu@chromium.org2013-09-191-22/+24
| | | | | | | | | | | | | | | | | > Remove dependency on Skia from chromoting client. > > Now DesktopRegion, DesktopRect and DesktopSize are used instead of > corresponding skia types. > > TBR=reed@google.com (for _moved_ skia dependency) > > Review URL: https://chromiumcodereview.appspot.com/23440046 TBR=sergeyu@chromium.org Review URL: https://codereview.chromium.org/24217003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224205 0039d316-1c4b-4281-b951-d872f2087c98
* Remove dependency on Skia from chromoting client.sergeyu@chromium.org2013-09-191-24/+22
| | | | | | | | | | | Now DesktopRegion, DesktopRect and DesktopSize are used instead of corresponding skia types. TBR=reed@google.com (for _moved_ skia dependency) Review URL: https://chromiumcodereview.appspot.com/23440046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224101 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify VideoEncoder interface.sergeyu@chromium.org2013-09-131-16/+8
| | | | | | | | | | | This should also avoid assert in the linked bug. BUG=284775 R=wez@chromium.org Review URL: https://codereview.chromium.org/23477059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223152 0039d316-1c4b-4281-b951-d872f2087c98
* Move ScopedClosureRunner to callback_helpers, add Reset.avi@chromium.org2013-08-301-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/23514018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220473 0039d316-1c4b-4281-b951-d872f2087c98
* Abstract PPAPI's ImageData behind webrtc::DesktopFrame interfacesolb@chromium.org2013-07-041-8/+7
| | | | | | | | | | | | This abstracts away RectangleUpdateDecoder's direct use of the the former class. It will ease the development of non--Web app client implementations. BUG=255309 TBR=brettw (third_party/webrtc dependency) Review URL: https://chromiumcodereview.appspot.com/18233015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210113 0039d316-1c4b-4281-b951-d872f2087c98
* Added the desktop shape fields to VideoPacket.alexeypa@chromium.org2013-06-211-0/+4
| | | | | | | | If the host passes the desktop shape region in a VideoPacket the client will use it to draw transparent regions. The client also informs the web-app of the desktop shape changes, so it can set the input passthrough region correctly. Review URL: https://chromiumcodereview.appspot.com/17511004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207789 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ZLib codec support from chromoting host and client.sergeyu@chromium.org2012-10-181-4/+2
| | | | | | | | | We were not using ZLIB codec anyway, so there is no reason to keep it around. Review URL: https://chromiumcodereview.appspot.com/11195029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162635 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup RectangleUpdateDecoder and VideoStubsergeyu@chromium.org2012-08-301-59/+11
| | | | | | | | | | Previously RectangleUpdateDecoder maintaned list of pending packets. That's not really necessary. Simplified it by queue tasks on the decode thread. Also some minor cleanups for the VideoStub interface - removed GetPendingVideoPackets() that wasn't used anywhere. Review URL: https://chromiumcodereview.appspot.com/10879085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154272 0039d316-1c4b-4281-b951-d872f2087c98
* Moved video stub implementation to RectangleUpdateDecoder.kxing@chromium.org2012-08-241-19/+135
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10867039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153305 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed Decoder -> VideoDecoder.kxing@chromium.org2012-08-241-4/+4
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10873047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153140 0039d316-1c4b-4281-b951-d872f2087c98
* Moved the video encoders/decoders to the codec directory.kxing@chromium.org2012-08-231-3/+3
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10877014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152912 0039d316-1c4b-4281-b951-d872f2087c98
* Propagate DPI information to web-app.jamiewalch@chromium.org2012-07-201-6/+16
| | | | | | | | | | BUG=135089 TEST= Review URL: https://chromiumcodereview.appspot.com/10801003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147605 0039d316-1c4b-4281-b951-d872f2087c98
* MessageLoopProxy cleanups in remoting client.sergeyu@chromium.org2012-06-121-13/+13
| | | | | | | | | | | Replaced all usage of MessageLoopProxy with SingleThreadTaskRunner. Also includes some other minor cleanups, e.g. removed ClientContext::network_message_loop(). Review URL: https://chromiumcodereview.appspot.com/10454018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141589 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor VideoStub interface to accept ownership of video packets.sergeyu@chromium.org2012-03-281-3/+3
| | | | | | | | | | | Previously VideoStub::ProcessVideoPacket() did not accept ownership of video packets. Instead the done callback was responsible for deleting the packet. Review URL: http://codereview.chromium.org/9827006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129355 0039d316-1c4b-4281-b951-d872f2087c98
* Fix RectangleUpdateDecoder to reference the FrameConsumerProxy.wez@chromium.org2012-03-151-1/+2
| | | | | | | | | | | | | | | | | | | RectangleUpdateDecoder runs on a separate thread from the FrameConsumer in the PPAPI plugin client, requiring FrameConsumer calls to be proxied to the correct thread. Previously it was passed a bare FrameConsumer pointer, with the underlying FrameConsumerProxy lifetime managed by the ChromotingInstance. Since the RectangleUpdateDecoder is itself ref-counted it can outlive the ChromotingInstance, and thereby the FrameConsumerProxy, if it is still processing queued messages at the time. This CL: * Changes RectangleUpdateDecoder() to take scoped_refptr<>s to the message-loop-proxy and consumer. * Has RectangleUpdateDecoder() take a FrameConsumerProxy, since FrameConsumer is not ref-counted. Ideally it should take a scoped_ptr<FrameConsumer>, and leave ref-counting to be an internal detail of FrameConsumerProxy. Also: * FrameConsumerProxy now accepts a WeakPtr<FrameConsumer>, removing the need for an explicit Detach(), which feels safer. The WeakPtr must have been created on the thread the FrameConsumerProxy will punt calls to, which shouldn't be a problem. * PepperView now SupportsWeakPtr rather than containing a WeakPtrFactory, to make it easy to get a WeakPtr to it. BUG=118110 Review URL: http://codereview.chromium.org/9703006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127035 0039d316-1c4b-4281-b951-d872f2087c98
* Schedule a paint if the client plugin's view size or clip change.wez@chromium.org2012-03-131-4/+18
| | | | | | | | | | | | | Without this the view will only update after being scrolled when the next change is received from the host. This CL also coalesces multiple scheduled paints to a single operation to avoid operations such as simultaneous resize and scroll from duplicating work. BUG=117494,117925 Review URL: http://codereview.chromium.org/9677026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126485 0039d316-1c4b-4281-b951-d872f2087c98
* Fix startup race-conditions in new Decoder pipeline:wez@chromium.org2012-03-081-1/+6
| | | | | | | | | | | | | | | | | Fix RectangleUpdateDecoder to cope with rendering requests before it is ready. Fix PepperView not to InitiateDrawing() until initialized. Fix DecoderVp8::RenderFrame() to allow being called before a frame is decoded. Add DCHECKs for screen and view size to DecoderVp8. Clarify requirements on FrameProducer interface implementation in comments. Clarify screen and view size requirements on Decoder interface methods. BUG=116842,116851 Review URL: http://codereview.chromium.org/9624022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125536 0039d316-1c4b-4281-b951-d872f2087c98
* This CL makes several the following improvements to the Chromoting decoder ↵alexeypa@chromium.org2012-02-241-121/+85
| | | | | | | | | | | | | | | pipeline: 1. Only the clipping area, not the full frame, is drawn. This reduces the risk of out of memory situation on high page zoom levels. Screen updates are also incremental including scrolling scenarios. 2. Decoders now write pixels directly to the Pepper API backing store making it one memcpy less. 3. Scaling and panning is fully controlled by the plugin. The decoder only supplies the pixels it was asked for by the plugin. BUG=109938 Review URL: http://codereview.chromium.org/9331003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123573 0039d316-1c4b-4281-b951-d872f2087c98
* Replace RectVectors with SkRegions in Decoder.wez@chromium.org2012-01-291-15/+15
| | | | | | | | | | | BUG=105401 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=118790 Review URL: http://codereview.chromium.org/9277001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119632 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 118790 - Compile error due to missing operator== on SkRegionrsleevi@chromium.org2012-01-241-15/+15
| | | | | | | | | | | | | | Replace RectVectors with SkRegions in Decoder. BUG=105401 Review URL: http://codereview.chromium.org/9277001 TBR=wez@chromium.org Review URL: https://chromiumcodereview.appspot.com/9146030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118793 0039d316-1c4b-4281-b951-d872f2087c98
* Replace RectVectors with SkRegions in Decoder.wez@chromium.org2012-01-241-15/+15
| | | | | | | | | BUG=105401 Review URL: http://codereview.chromium.org/9277001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118790 0039d316-1c4b-4281-b951-d872f2087c98
* Remove task.h and finish base::Bind() migration.ajwong@chromium.org2012-01-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over 341 CLs, in ~3 months, touching 3251 unique files! Top 5 most CLs: (121) jhawkins ( 45) dcheng ( 24) achuith ( 23) csilv ( 12) tfarina ( 12) groby ~1000 files touched: (918) jhawkins 100+ files touched: (486) ajwong (385) willchan (372) dcheng (126) csilv (123) fischman (112) sergeyu 49+ files touched: (65) tfarina (57) acolwell (52) adamk (49) tzik BUG=35223 TEST=existing Review URL: http://codereview.chromium.org/9114020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116748 0039d316-1c4b-4281-b951-d872f2087c98
* Used MessageLoopProxy instead of MessageLoop in RectangleUpdateDecoder.sanjeevr@chromium.org2012-01-041-11/+12
| | | | | | | | | | BUG=NONE TEST=Chromoting client Review URL: http://codereview.chromium.org/9049011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116279 0039d316-1c4b-4281-b951-d872f2087c98
* Remove support for the initial-resolution tag in session descriptions.wez@chromium.org2012-01-011-29/+22
| | | | | | | | | TEST=Unit-tests & manual interoperability testing with older versions. Review URL: http://codereview.chromium.org/9021044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116083 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring of the client-side input pipeline and scaling dimension management.wez@chromium.org2011-12-221-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes are: * Express key-release, mouse coordinate scaling and clamping as InputStubs. * KeyEventTracker handles key release. * MouseInputFilter handles mouse scaling & clamping. * PepperInputHandler converts Pepper events to InputStub events. * Replace scaling ratios with host and view dimensions. This resulted in some related changes * The DecoderVp8 enforces a <=1:1 output-size before converting the frame. * The setScaleToFit() API now has no effect. * ChromotingView has become a pure interface again. Things this CL is currently missing: * Unit-tests for the new components. Future work: * Move the non-Pepper-specific input pipeline components to ChromotingClient. * Rework the decode / convert / scale / render pipeline. BUG=93552 TEST=remoting_unittests, and manual testing. Review URL: http://codereview.chromium.org/8985007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115511 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2011-12-201-0/+2
| | | | | | | | | | | | | CID=100356,100360,100368,100373,100374,100562,101529,101530,101536,101541, 101542,101595,101630,101685,101687,101689,101776,101812,101813,101854, 101861,101862,101871,101883,101886,101887,102034 BUG=none TEST=none R=binji Review URL: http://codereview.chromium.org/8965054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115225 0039d316-1c4b-4281-b951-d872f2087c98
* Remoting client rectangle decoder and VP8 decoder fixes.wez@chromium.org2011-12-201-31/+16
| | | | | | | | | | | These are required to avoid artefacts when linear scaling is implemented. BUG=93451 Review URL: http://codereview.chromium.org/8745008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115088 0039d316-1c4b-4281-b951-d872f2087c98
* Move code in src/remoting to the new callbacks.sergeyu@chromium.org2011-11-101-66/+29
| | | | | | | | | BUG=None TEST=Remoting still works. Review URL: http://codereview.chromium.org/8493020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109367 0039d316-1c4b-4281-b951-d872f2087c98
* Move us fully from gfx:: over to skia types for consistency.dmaclach@chromium.org2011-09-301-34/+38
| | | | | | | | | | | BUG=92085 TEST=BUILD Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=103523 Review URL: http://codereview.chromium.org/7992011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103533 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 103523 - Move us fully from gfx:: over to skia types for consistency.dmaclach@chromium.org2011-09-301-38/+34
| | | | | | | | | | | | BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/7992011 TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/8103006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103526 0039d316-1c4b-4281-b951-d872f2087c98
* Move us fully from gfx:: over to skia types for consistency.dmaclach@chromium.org2011-09-301-34/+38
| | | | | | | | | BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/7992011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103523 0039d316-1c4b-4281-b951-d872f2087c98
* Remove all the experimental Traced Task code from remoting.ajwong@chromium.org2011-09-121-27/+16
| | | | | | | | | | | | This code is obsolete and never fully functioned anyways. Deleting. BUG=57373,65680,73744 TEST=valgrind Review URL: http://codereview.chromium.org/7780019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100788 0039d316-1c4b-4281-b951-d872f2087c98
* Pass SessionConfig by reference instead of pointer.sergeyu@chromium.org2011-09-101-4/+4
| | | | | | | | | BUG=88600 TEST=Unittests Review URL: http://codereview.chromium.org/7796026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100587 0039d316-1c4b-4281-b951-d872f2087c98
* Build remoting with libvpx in all platformshclam@chromium.org2011-08-121-5/+2
| | | | | | | | | | | | Now that libvpx is building on ARM remoting should use it on all platforms. BUG=47285 TEST=chromoting runs on ARM Review URL: http://codereview.chromium.org/7623020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96543 0039d316-1c4b-4281-b951-d872f2087c98
* 2. Implement scale-to-fit and clipping in DecoderVp8hclam@chromium.org2011-07-261-12/+137
| | | | | | | | | | | Perform color space conversion and scaling in DecoderVp8 using fast SIMD routines. Also move clipping to DecoderVp8 to save more CPU cycles. BUG=None TEST=None Review URL: http://codereview.chromium.org/7396005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94099 0039d316-1c4b-4281-b951-d872f2087c98
* Move media library AutoTaskRunner to base and rename ScopedTaskRunner.wez@chromium.org2011-05-271-9/+7
| | | | | | | | | | | | | | This is needed to avoid faux dependencies on media/ creeping in to remoting/ code, and creating linker issues. BUG= TEST=Everything works as before. Shared component builds certainly don't break. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86971 (Reverted - broke shared builds) Review URL: http://codereview.chromium.org/7062013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87068 0039d316-1c4b-4281-b951-d872f2087c98
* 1;2305;0cRevert 86971 - Move media library AutoTaskRunner to base and rename ↵wez@chromium.org2011-05-271-7/+9
| | | | | | | | | | | | | | | | | ScopedTaskRunner. This is needed to avoid faux dependencies on media/ creeping in to remoting/ code, and creating linker issues. BUG= TEST=Everything works as before. Review URL: http://codereview.chromium.org/7062013 TBR=wez@chromium.org Review URL: http://codereview.chromium.org/7062042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86972 0039d316-1c4b-4281-b951-d872f2087c98
* Move media library AutoTaskRunner to base and rename ScopedTaskRunner.wez@chromium.org2011-05-271-9/+7
| | | | | | | | | | | | This is needed to avoid faux dependencies on media/ creeping in to remoting/ code, and creating linker issues. BUG= TEST=Everything works as before. Review URL: http://codereview.chromium.org/7062013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86971 0039d316-1c4b-4281-b951-d872f2087c98
* Let the host change resolution.simonmorris@chromium.org2011-03-041-50/+64
| | | | | | | | | | | | | | | | The screen size flows through the video pipeline, instead of being set statically when that pipeline is constructed. Only the Windows host actually detects when the screen size has changed. BUG=72469 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76747 Review URL: http://codereview.chromium.org/6573005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76908 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76747 - Let the host change resolution.simonmorris@chromium.org2011-03-031-64/+50
| | | | | | | | | | | | | | | | | The screen size flows through the video pipeline, instead of being set statically when that pipeline is constructed. Only the Windows host actually detects when the screen size has changed. BUG=72469 TEST=none Review URL: http://codereview.chromium.org/6573005 TBR=simonmorris@chromium.org Review URL: http://codereview.chromium.org/6610018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76748 0039d316-1c4b-4281-b951-d872f2087c98
* Let the host change resolution.simonmorris@chromium.org2011-03-031-50/+64
| | | | | | | | | | | | | | The screen size flows through the video pipeline, instead of being set statically when that pipeline is constructed. Only the Windows host actually detects when the screen size has changed. BUG=72469 TEST=none Review URL: http://codereview.chromium.org/6573005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76747 0039d316-1c4b-4281-b951-d872f2087c98
* Add VideoPacket struct for video packets. Refactor Decode interface to use it.sergeyu@chromium.org2010-11-091-104/+44
| | | | | | | | | | Various cleanups. BUG=None TEST=Unittests. Review URL: http://codereview.chromium.org/4476003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65590 0039d316-1c4b-4281-b951-d872f2087c98
* Fix arm build.sergeyu@chromium.org2010-11-021-0/+3
| | | | | | TBR=ajwong git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64702 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanups in the video encoding decoding code. Reenable VP8.sergeyu@chromium.org2010-11-021-17/+19
| | | | | | | | | | | | | | | 1. Moved video-related protobuf messages from event.proto to video.proto. Removed those that we don't need anymore 2. Fixed naming for enums and some types. 3. Reenabled VP8. 4. Proper RGB-YUV converter for VP8 encoder. 5. Changed the capturer_fake to show more meaningful picture. BUG=57374 TEST=unittests Review URL: http://codereview.chromium.org/4136010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64700 0039d316-1c4b-4281-b951-d872f2087c98