author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 15:10:48 +0300 | |
changeset 30 | 5dc02b23752f |
parent 0 | 1918ee327afb |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
* Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
|
3 |
* |
|
4 |
* This library is free software; you can redistribute it and/or |
|
5 |
* modify it under the terms of the GNU Library General Public |
|
6 |
* License as published by the Free Software Foundation; either |
|
7 |
* version 2 of the License, or (at your option) any later version. |
|
8 |
* |
|
9 |
* This library is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
12 |
* Library General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU Library General Public License |
|
15 |
* along with this library; see the file COPYING.LIB. If not, write to |
|
16 |
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
17 |
* Boston, MA 02110-1301, USA. |
|
18 |
*/ |
|
19 |
||
20 |
#ifndef Chrome_h |
|
21 |
#define Chrome_h |
|
22 |
||
23 |
#include "Cursor.h" |
|
24 |
#include "FileChooser.h" |
|
25 |
#include "FocusDirection.h" |
|
26 |
#include "HostWindow.h" |
|
27 |
#include <wtf/Forward.h> |
|
28 |
#include <wtf/RefPtr.h> |
|
29 |
||
30 |
#if PLATFORM(MAC) |
|
31 |
#ifndef __OBJC__ |
|
32 |
class NSView; |
|
33 |
#endif |
|
34 |
#endif |
|
35 |
||
36 |
namespace WebCore { |
|
37 |
||
38 |
class ChromeClient; |
|
39 |
class ContextMenu; |
|
40 |
class FloatRect; |
|
41 |
class Frame; |
|
42 |
class Geolocation; |
|
43 |
class HitTestResult; |
|
44 |
class IntRect; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
45 |
class Node; |
0 | 46 |
class Page; |
47 |
class String; |
|
48 |
#if ENABLE(NOTIFICATIONS) |
|
49 |
class NotificationPresenter; |
|
50 |
#endif |
|
51 |
||
52 |
struct FrameLoadRequest; |
|
53 |
struct WindowFeatures; |
|
54 |
||
55 |
class Chrome : public HostWindow { |
|
56 |
public: |
|
57 |
Chrome(Page*, ChromeClient*); |
|
58 |
~Chrome(); |
|
59 |
||
60 |
ChromeClient* client() { return m_client; } |
|
61 |
||
62 |
// HostWindow methods. |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
63 |
|
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
64 |
virtual void invalidateWindow(const IntRect&, bool); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
65 |
virtual void invalidateContentsAndWindow(const IntRect&, bool); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
66 |
virtual void invalidateContentsForSlowScroll(const IntRect&, bool); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
67 |
virtual void scroll(const IntSize&, const IntRect&, const IntRect&); |
0 | 68 |
virtual IntPoint screenToWindow(const IntPoint&) const; |
69 |
virtual IntRect windowToScreen(const IntRect&) const; |
|
70 |
virtual PlatformPageClient platformPageClient() const; |
|
71 |
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const; |
|
72 |
virtual void scrollbarsModeDidChange() const; |
|
73 |
||
74 |
void contentsSizeChanged(Frame*, const IntSize&) const; |
|
75 |
||
76 |
void setWindowRect(const FloatRect&) const; |
|
77 |
FloatRect windowRect() const; |
|
78 |
||
79 |
FloatRect pageRect() const; |
|
80 |
||
81 |
float scaleFactor(); |
|
82 |
||
83 |
void focus() const; |
|
84 |
void unfocus() const; |
|
85 |
||
86 |
bool canTakeFocus(FocusDirection) const; |
|
87 |
void takeFocus(FocusDirection) const; |
|
88 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
89 |
void focusedNodeChanged(Node*) const; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
90 |
|
0 | 91 |
Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&) const; |
92 |
void show() const; |
|
93 |
||
94 |
bool canRunModal() const; |
|
95 |
bool canRunModalNow() const; |
|
96 |
void runModal() const; |
|
97 |
||
98 |
void setToolbarsVisible(bool) const; |
|
99 |
bool toolbarsVisible() const; |
|
100 |
||
101 |
void setStatusbarVisible(bool) const; |
|
102 |
bool statusbarVisible() const; |
|
103 |
||
104 |
void setScrollbarsVisible(bool) const; |
|
105 |
bool scrollbarsVisible() const; |
|
106 |
||
107 |
void setMenubarVisible(bool) const; |
|
108 |
bool menubarVisible() const; |
|
109 |
||
110 |
void setResizable(bool) const; |
|
111 |
||
112 |
bool canRunBeforeUnloadConfirmPanel(); |
|
113 |
bool runBeforeUnloadConfirmPanel(const String& message, Frame* frame); |
|
114 |
||
115 |
void closeWindowSoon(); |
|
116 |
||
117 |
void runJavaScriptAlert(Frame*, const String&); |
|
118 |
bool runJavaScriptConfirm(Frame*, const String&); |
|
119 |
bool runJavaScriptPrompt(Frame*, const String& message, const String& defaultValue, String& result); |
|
120 |
void setStatusbarText(Frame*, const String&); |
|
121 |
bool shouldInterruptJavaScript(); |
|
122 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
123 |
void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
124 |
void registerContentHandler(const String& mimeType, const String& baseURL, const String& url, const String& title); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
125 |
|
0 | 126 |
IntRect windowResizerRect() const; |
127 |
||
128 |
void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags); |
|
129 |
||
130 |
void setToolTip(const HitTestResult&); |
|
131 |
||
132 |
void print(Frame*); |
|
133 |
||
134 |
void requestGeolocationPermissionForFrame(Frame*, Geolocation*); |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
135 |
void cancelGeolocationPermissionRequestForFrame(Frame*); |
0 | 136 |
|
137 |
void runOpenPanel(Frame*, PassRefPtr<FileChooser>); |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
138 |
void chooseIconForFiles(const Vector<String>&, PassRefPtr<FileChooser>); |
0 | 139 |
|
140 |
bool setCursor(PlatformCursorHandle); |
|
141 |
||
142 |
#if PLATFORM(MAC) |
|
143 |
void focusNSView(NSView*); |
|
144 |
#endif |
|
145 |
||
146 |
#if ENABLE(NOTIFICATIONS) |
|
147 |
NotificationPresenter* notificationPresenter() const; |
|
148 |
#endif |
|
149 |
||
150 |
private: |
|
151 |
Page* m_page; |
|
152 |
ChromeClient* m_client; |
|
153 |
}; |
|
154 |
} |
|
155 |
||
156 |
#endif // Chrome_h |