Changeset 47060 in webkit


Ignore:
Timestamp:
Aug 11, 2009 2:04:00 PM (15 years ago)
Author:
bweinstein@apple.com
Message:

2009-08-11 Brian Weinstein <bweinstein@apple.com>

Reviewed by Steve Falkenburg.

Refactored MIMETypeforExtension to be a member of IWebViewPrivate
instead of IWebView.

  • Interfaces/IWebView.idl:
  • Interfaces/IWebViewPrivate.idl:
  • WebView.cpp: (WebView::MIMETypeForExtension):
  • WebView.h:
Location:
trunk/WebKit/win
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/win/ChangeLog

    r47058 r47060  
     12009-08-11  Brian Weinstein  <bweinstein@apple.com>
     2
     3        Reviewed by Steve Falkenburg.
     4
     5        Refactored MIMETypeforExtension to be a member of IWebViewPrivate
     6        instead of IWebView.
     7
     8        * Interfaces/IWebView.idl:
     9        * Interfaces/IWebViewPrivate.idl:
     10        * WebView.cpp:
     11        (WebView::MIMETypeForExtension):
     12        * WebView.h:
     13
    1142009-08-11  Drew Wilson <atwilson@google.com>
    215
  • trunk/WebKit/win/Interfaces/IWebView.idl

    r47044 r47060  
    736736    */
    737737    HRESULT close();
    738 
    739     /*!
    740         @method MIMETypeForExtension:
    741         @abstract Returns the mime type for a certian file extension.
    742         @param path The extension of the file to check.
    743         @result The mime type of the specified extension.
    744         + (BSTR)MIMETypeForPath:(NSString *)path;
    745     */
    746     HRESULT MIMETypeForExtension([in] BSTR extension, [out, retval] BSTR* mimeType);
    747738}
    748739
  • trunk/WebKit/win/Interfaces/IWebViewPrivate.idl

    r46649 r47060  
    162162
    163163    HRESULT setCanStartPlugins([in] BOOL canStartPlugins);
     164
     165    /*!
     166        @method MIMETypeForExtension:
     167        @abstract Returns the mime type for a certian file extension.
     168        @param path The extension of the file to check.
     169        @result The mime type of the specified extension.
     170        + (BSTR)MIMETypeForPath:(NSString *)path;
     171    */
     172    HRESULT MIMETypeForExtension([in] BSTR extension, [out, retval] BSTR* mimeType);
    164173}
  • trunk/WebKit/win/WebView.cpp

    r47044 r47060  
    22002200// IWebView --------------------------------------------------------------------
    22012201
    2202 HRESULT STDMETHODCALLTYPE WebView::MIMETypeForExtension(
    2203     /* [in] */ BSTR extension,
    2204     /* [retval][out] */ BSTR* mimeType)
    2205 {
    2206     if (!mimeType)
    2207         return E_POINTER;
    2208 
    2209     String extensionStr(extension, SysStringLen(extension));
    2210 
    2211     *mimeType = BString(MIMETypeRegistry::getMIMETypeForExtension(extensionStr)).release();
    2212 
    2213     return S_OK;
    2214 }
    2215 
    22162202HRESULT STDMETHODCALLTYPE WebView::canShowMIMEType(
    22172203    /* [in] */ BSTR mimeType,
     
    44064392
    44074393// IWebViewPrivate ------------------------------------------------------------
     4394
     4395HRESULT STDMETHODCALLTYPE WebView::MIMETypeForExtension(
     4396    /* [in] */ BSTR extension,
     4397    /* [retval][out] */ BSTR* mimeType)
     4398{
     4399    if (!mimeType)
     4400        return E_POINTER;
     4401
     4402    String extensionStr(extension, SysStringLen(extension));
     4403
     4404    *mimeType = BString(MIMETypeRegistry::getMIMETypeForExtension(extensionStr)).release();
     4405
     4406    return S_OK;
     4407}
    44084408
    44094409HRESULT STDMETHODCALLTYPE WebView::setCustomDropTarget(
  • trunk/WebKit/win/WebView.h

    r47044 r47060  
    7474    // IWebView
    7575
    76     virtual HRESULT STDMETHODCALLTYPE MIMETypeForExtension(
    77         /* [in] */ BSTR extension,
    78         /* [retval][out] */ BSTR *mimeType);
    79 
    8076    virtual HRESULT STDMETHODCALLTYPE canShowMIMEType(
    8177        /* [in] */ BSTR mimeType,
     
    573569
    574570    // IWebViewPrivate
     571
     572    virtual HRESULT STDMETHODCALLTYPE MIMETypeForExtension(
     573        /* [in] */ BSTR extension,
     574        /* [retval][out] */ BSTR *mimeType);
     575
    575576    virtual HRESULT STDMETHODCALLTYPE setCustomDropTarget(
    576577        /* [in] */ IDropTarget* dt);
Note: See TracChangeset for help on using the changeset viewer.