webengine/osswebengine/WebKit/win/WebChromeClient.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2  * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
       
     3  *
       
     4  * Redistribution and use in source and binary forms, with or without
       
     5  * modification, are permitted provided that the following conditions
       
     6  * are met:
       
     7  * 1. Redistributions of source code must retain the above copyright
       
     8  *    notice, this list of conditions and the following disclaimer.
       
     9  * 2. Redistributions in binary form must reproduce the above copyright
       
    10  *    notice, this list of conditions and the following disclaimer in the
       
    11  *    documentation and/or other materials provided with the distribution.
       
    12  *
       
    13  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
       
    14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
       
    15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
       
    16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
       
    17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
       
    18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
       
    19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
       
    20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
       
    21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
       
    22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
       
    23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
       
    24  */
       
    25 
       
    26 #include <WebCore/ChromeClient.h>
       
    27 #include <WebCore/FocusDirection.h>
       
    28 #include <wtf/Forward.h>
       
    29 
       
    30 class WebView;
       
    31 
       
    32 class WebChromeClient : public WebCore::ChromeClient {
       
    33 public:
       
    34     WebChromeClient(WebView*);
       
    35 
       
    36     virtual void chromeDestroyed();
       
    37 
       
    38     virtual void setWindowRect(const WebCore::FloatRect&);
       
    39     virtual WebCore::FloatRect windowRect();
       
    40     
       
    41     virtual WebCore::FloatRect pageRect();
       
    42     
       
    43     virtual float scaleFactor();
       
    44 
       
    45     virtual void focus();
       
    46     virtual void unfocus();
       
    47 
       
    48     virtual bool canTakeFocus(WebCore::FocusDirection);
       
    49     virtual void takeFocus(WebCore::FocusDirection);
       
    50 
       
    51     virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&);
       
    52     virtual WebCore::Page* createModalDialog(WebCore::Frame*, const WebCore::FrameLoadRequest&);
       
    53     virtual void show();
       
    54 
       
    55     virtual bool canRunModal();
       
    56     virtual void runModal();
       
    57 
       
    58     virtual void setToolbarsVisible(bool);
       
    59     virtual bool toolbarsVisible();
       
    60     
       
    61     virtual void setStatusbarVisible(bool);
       
    62     virtual bool statusbarVisible();
       
    63     
       
    64     virtual void setScrollbarsVisible(bool);
       
    65     virtual bool scrollbarsVisible();
       
    66     
       
    67     virtual void setMenubarVisible(bool);
       
    68     virtual bool menubarVisible();
       
    69 
       
    70     virtual void setResizable(bool);
       
    71 
       
    72     virtual void addMessageToConsole(const WebCore::String& message, unsigned line, const WebCore::String& url);
       
    73 
       
    74     virtual bool canRunBeforeUnloadConfirmPanel();
       
    75     virtual bool runBeforeUnloadConfirmPanel(const WebCore::String& message, WebCore::Frame* frame);
       
    76 
       
    77     virtual void closeWindowSoon();
       
    78 
       
    79     virtual void runJavaScriptAlert(WebCore::Frame*, const WebCore::String&);
       
    80     virtual bool runJavaScriptConfirm(WebCore::Frame*, const WebCore::String&);
       
    81     virtual bool runJavaScriptPrompt(WebCore::Frame*, const WebCore::String& message, const WebCore::String& defaultValue, WebCore::String& result);
       
    82     virtual void setStatusbarText(const WebCore::String&);
       
    83     virtual bool shouldInterruptJavaScript();
       
    84 
       
    85     virtual bool tabsToLinks() const;
       
    86     virtual WebCore::IntRect windowResizerRect() const;
       
    87     virtual void addToDirtyRegion(const WebCore::IntRect&);
       
    88     virtual void scrollBackingStore(int dx, int dy, const WebCore::IntRect& scrollViewRect, const WebCore::IntRect& clipRect);
       
    89     virtual void updateBackingStore();
       
    90 
       
    91     virtual void mouseDidMoveOverElement(const WebCore::HitTestResult&, unsigned modifierFlags);
       
    92 
       
    93     virtual void setToolTip(const WebCore::String&);
       
    94 
       
    95     virtual void print(WebCore::Frame*);
       
    96 
       
    97 private:
       
    98     WebView* m_webView;
       
    99 };