Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
pagespeed::image_compression::ConversionTimeoutHandler Class Reference

Class for managing image conversion timeouts. More...

#include "image_util.h"

Public Member Functions

 ConversionTimeoutHandler (int64 time_allowed_ms, net_instaweb::Timer *timer, net_instaweb::MessageHandler *handler)
void Start (GoogleString *output)
void Stop ()
bool was_timed_out () const
int64 time_elapsed_ms () const

Static Public Member Functions

static bool Continue (int percent, void *user_data)

Detailed Description

Class for managing image conversion timeouts.

Member Function Documentation

static bool pagespeed::image_compression::ConversionTimeoutHandler::Continue ( int  percent,
void *  user_data 

Returns true if (1) the timer has not expired, or (2) the timer has expired but "output_" is not empty which means that some data are being written to it. This method can be passed as progress hook to WebP writer. Input parameter "user_data" must point to a ConversionTimeoutHandler object.

The documentation for this class was generated from the following file: