1cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block/*
2cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * Copyright (C) 2009 Apple Inc.  All rights reserved.
3cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block *
4cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * Redistribution and use in source and binary forms, with or without
5cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * modification, are permitted provided that the following conditions
6cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * are met:
7cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * 1. Redistributions of source code must retain the above copyright
8cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block *    notice, this list of conditions and the following disclaimer.
9cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * 2. Redistributions in binary form must reproduce the above copyright
10cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block *    notice, this list of conditions and the following disclaimer in the
11cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block *    documentation and/or other materials provided with the distribution.
12cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block *
13cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block */
25cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
26cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block#ifndef HistoryDelegate_h
27cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block#define HistoryDelegate_h
28cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
29cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block#include <WebKit/WebKit.h>
30cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block#include <wtf/OwnPtr.h>
31cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
32cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Blockclass HistoryDelegate : public IWebHistoryDelegate {
33cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Blockpublic:
34cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    HistoryDelegate();
35cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    virtual ~HistoryDelegate();
36cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
37cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    // IUnknown
38cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
39cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    virtual ULONG STDMETHODCALLTYPE AddRef(void);
40cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    virtual ULONG STDMETHODCALLTYPE Release(void);
41cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
42cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    // IWebHistoryDelegate
43cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    virtual HRESULT STDMETHODCALLTYPE didNavigateWithNavigationData(
44cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ IWebView* webView,
45cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ IWebNavigationData* navigationData,
46cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ IWebFrame* webFrame);
47cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
48cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    virtual HRESULT STDMETHODCALLTYPE didPerformClientRedirectFromURL(
49cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ IWebView* webView,
50cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ BSTR sourceURL,
51cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ BSTR destinationURL,
52cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ IWebFrame* webFrame);
53cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
54cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    virtual HRESULT STDMETHODCALLTYPE didPerformServerRedirectFromURL(
55cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ IWebView* webView,
56cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ BSTR sourceURL,
57cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ BSTR destinationURL,
58cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ IWebFrame* webFrame);
59cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
60cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    virtual HRESULT STDMETHODCALLTYPE updateHistoryTitle(
61cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ IWebView* webView,
62cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ BSTR title,
63cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ BSTR url);
64cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
65cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    virtual HRESULT STDMETHODCALLTYPE populateVisitedLinksForWebView(
66cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block        /* [in] */ IWebView* webView);
67cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
68cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Blockprivate:
69cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block    ULONG m_refCount;
70cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block};
71cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block
72cac0f67c402d107cdb10971b95719e2ff9c7c76bSteve Block#endif // HistoryDelegate_h
73