OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights
reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 virtual FloatRect pageRect() = 0; | 94 virtual FloatRect pageRect() = 0; |
95 | 95 |
96 virtual void focus() = 0; | 96 virtual void focus() = 0; |
97 virtual void unfocus() = 0; | 97 virtual void unfocus() = 0; |
98 | 98 |
99 virtual bool canTakeFocus(FocusDirection) = 0; | 99 virtual bool canTakeFocus(FocusDirection) = 0; |
100 virtual void takeFocus(FocusDirection) = 0; | 100 virtual void takeFocus(FocusDirection) = 0; |
101 | 101 |
102 virtual void focusedNodeChanged(Node*) = 0; | 102 virtual void focusedNodeChanged(Node*) = 0; |
103 virtual void focusedFrameChanged(Frame*) = 0; | |
104 | 103 |
105 // The Frame pointer provides the ChromeClient with context about which | 104 // The Frame pointer provides the ChromeClient with context about which |
106 // Frame wants to create the new Page. Also, the newly created window | 105 // Frame wants to create the new Page. Also, the newly created window |
107 // should not be shown to the user until the ChromeClient of the newly | 106 // should not be shown to the user until the ChromeClient of the newly |
108 // created Page has its show method called. | 107 // created Page has its show method called. |
109 // The FrameLoadRequest parameter is only for ChromeClient to check if the | 108 // The FrameLoadRequest parameter is only for ChromeClient to check if the |
110 // request could be fulfilled. The ChromeClient should not load the request. | 109 // request could be fulfilled. The ChromeClient should not load the request. |
111 virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeat
ures&, const NavigationAction&) = 0; | 110 virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeat
ures&, const NavigationAction&) = 0; |
112 virtual void show() = 0; | 111 virtual void show() = 0; |
113 | 112 |
(...skipping 23 matching lines...) Expand all Loading... |
137 | 136 |
138 virtual bool canRunBeforeUnloadConfirmPanel() = 0; | 137 virtual bool canRunBeforeUnloadConfirmPanel() = 0; |
139 virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame*) = 0; | 138 virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame*) = 0; |
140 | 139 |
141 virtual void closeWindowSoon() = 0; | 140 virtual void closeWindowSoon() = 0; |
142 | 141 |
143 virtual void runJavaScriptAlert(Frame*, const String&) = 0; | 142 virtual void runJavaScriptAlert(Frame*, const String&) = 0; |
144 virtual bool runJavaScriptConfirm(Frame*, const String&) = 0; | 143 virtual bool runJavaScriptConfirm(Frame*, const String&) = 0; |
145 virtual bool runJavaScriptPrompt(Frame*, const String& message, const String
& defaultValue, String& result) = 0; | 144 virtual bool runJavaScriptPrompt(Frame*, const String& message, const String
& defaultValue, String& result) = 0; |
146 virtual void setStatusbarText(const String&) = 0; | 145 virtual void setStatusbarText(const String&) = 0; |
147 virtual bool shouldInterruptJavaScript() = 0; | |
148 virtual KeyboardUIMode keyboardUIMode() = 0; | 146 virtual KeyboardUIMode keyboardUIMode() = 0; |
149 | 147 |
150 virtual void* webView() const = 0; | 148 virtual void* webView() const = 0; |
151 | 149 |
152 virtual IntRect windowResizerRect() const = 0; | 150 virtual IntRect windowResizerRect() const = 0; |
153 | 151 |
154 // Methods used by HostWindow. | 152 // Methods used by HostWindow. |
155 virtual void invalidateRootView(const IntRect&) = 0; | |
156 virtual void invalidateContentsAndRootView(const IntRect&) = 0; | 153 virtual void invalidateContentsAndRootView(const IntRect&) = 0; |
157 virtual void invalidateContentsForSlowScroll(const IntRect&) = 0; | 154 virtual void invalidateContentsForSlowScroll(const IntRect&) = 0; |
158 virtual void scroll(const IntSize&, const IntRect&, const IntRect&) = 0; | 155 virtual void scroll(const IntSize&, const IntRect&, const IntRect&) = 0; |
159 virtual IntPoint screenToRootView(const IntPoint&) const = 0; | 156 virtual IntPoint screenToRootView(const IntPoint&) const = 0; |
160 virtual IntRect rootViewToScreen(const IntRect&) const = 0; | 157 virtual IntRect rootViewToScreen(const IntRect&) const = 0; |
161 virtual PlatformPageClient platformPageClient() const = 0; | 158 virtual PlatformPageClient platformPageClient() const = 0; |
162 virtual void scrollbarsModeDidChange() const = 0; | 159 virtual void scrollbarsModeDidChange() const = 0; |
163 virtual void setCursor(const Cursor&) = 0; | 160 virtual void setCursor(const Cursor&) = 0; |
164 virtual void setCursorHiddenUntilMouseMoves(bool) = 0; | 161 virtual void setCursorHiddenUntilMouseMoves(bool) = 0; |
165 #if !USE(REQUEST_ANIMATION_FRAME_TIMER) | 162 #if !USE(REQUEST_ANIMATION_FRAME_TIMER) |
(...skipping 15 matching lines...) Expand all Loading... |
181 virtual void unavailablePluginButtonClicked(Element*, RenderEmbeddedObject::
PluginUnavailabilityReason) const { } | 178 virtual void unavailablePluginButtonClicked(Element*, RenderEmbeddedObject::
PluginUnavailabilityReason) const { } |
182 virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifier
Flags) = 0; | 179 virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifier
Flags) = 0; |
183 | 180 |
184 virtual void setToolTip(const String&, TextDirection) = 0; | 181 virtual void setToolTip(const String&, TextDirection) = 0; |
185 | 182 |
186 virtual void print(Frame*) = 0; | 183 virtual void print(Frame*) = 0; |
187 virtual bool shouldRubberBandInDirection(ScrollDirection) const = 0; | 184 virtual bool shouldRubberBandInDirection(ScrollDirection) const = 0; |
188 | 185 |
189 virtual Color underlayColor() const { return Color(); } | 186 virtual Color underlayColor() const { return Color(); } |
190 | 187 |
191 virtual void exceededDatabaseQuota(Frame*, const String& databaseName, Datab
aseDetails) = 0; | |
192 | |
193 // Callback invoked when the application cache fails to save a cache object | |
194 // because storing it would grow the database file past its defined maximum | |
195 // size or past the amount of free space on the device. | |
196 // The chrome client would need to take some action such as evicting some | |
197 // old caches. | |
198 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded) = 0; | |
199 | |
200 // Callback invoked when the application cache origin quota is reached. This | |
201 // means that the resources attempting to be cached via the manifest are | |
202 // more than allowed on this origin. This callback allows the chrome client | |
203 // to take action, such as prompting the user to ask to increase the quota | |
204 // for this origin. The totalSpaceNeeded parameter is the total amount of | |
205 // storage, in bytes, needed to store the new cache along with all of the | |
206 // other existing caches for the origin that would not be replaced by | |
207 // the new cache. | |
208 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t tot
alSpaceNeeded) = 0; | |
209 | |
210 virtual void annotatedRegionsChanged(); | 188 virtual void annotatedRegionsChanged(); |
211 | 189 |
212 virtual void populateVisitedLinks(); | 190 virtual void populateVisitedLinks(); |
213 | 191 |
214 virtual FloatRect customHighlightRect(Node*, const AtomicString& type, const
FloatRect& lineRect); | 192 virtual FloatRect customHighlightRect(Node*, const AtomicString& type, const
FloatRect& lineRect); |
215 virtual void paintCustomHighlight(Node*, const AtomicString& type, const Flo
atRect& boxRect, const FloatRect& lineRect, bool behindText, bool entireLine); | 193 virtual void paintCustomHighlight(Node*, const AtomicString& type, const Flo
atRect& boxRect, const FloatRect& lineRect, bool behindText, bool entireLine); |
216 | 194 |
217 virtual bool shouldReplaceWithGeneratedFileForUpload(const String& path, Str
ing& generatedFilename); | 195 virtual bool shouldReplaceWithGeneratedFileForUpload(const String& path, Str
ing& generatedFilename); |
218 virtual String generateReplacementFile(const String& path); | 196 virtual String generateReplacementFile(const String& path); |
219 | 197 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 AnimationTrigger = 1 << 4, | 243 AnimationTrigger = 1 << 4, |
266 FilterTrigger = 1 << 5, | 244 FilterTrigger = 1 << 5, |
267 ScrollableInnerFrameTrigger = 1 << 6, | 245 ScrollableInnerFrameTrigger = 1 << 6, |
268 AllTriggers = 0xFFFFFFFF | 246 AllTriggers = 0xFFFFFFFF |
269 }; | 247 }; |
270 typedef unsigned CompositingTriggerFlags; | 248 typedef unsigned CompositingTriggerFlags; |
271 | 249 |
272 // Returns a bitfield indicating conditions that can trigger the compositor. | 250 // Returns a bitfield indicating conditions that can trigger the compositor. |
273 virtual CompositingTriggerFlags allowedCompositingTriggers() const { return
static_cast<CompositingTriggerFlags>(AllTriggers); } | 251 virtual CompositingTriggerFlags allowedCompositingTriggers() const { return
static_cast<CompositingTriggerFlags>(AllTriggers); } |
274 | 252 |
275 virtual bool supportsFullscreenForNode(const Node*) { return false; } | |
276 virtual void enterFullscreenForNode(Node*) { } | 253 virtual void enterFullscreenForNode(Node*) { } |
277 virtual void exitFullscreenForNode(Node*) { } | 254 virtual void exitFullscreenForNode(Node*) { } |
278 virtual bool requiresFullscreenForVideoPlayback() { return false; } | |
279 | 255 |
280 virtual bool supportsFullScreenForElement(const Element*, bool) { return fal
se; } | |
281 virtual void enterFullScreenForElement(Element*) { } | 256 virtual void enterFullScreenForElement(Element*) { } |
282 virtual void exitFullScreenForElement(Element*) { } | 257 virtual void exitFullScreenForElement(Element*) { } |
283 virtual void fullScreenRendererChanged(RenderBox*) { } | |
284 virtual void setRootFullScreenLayer(GraphicsLayer*) { } | 258 virtual void setRootFullScreenLayer(GraphicsLayer*) { } |
285 | 259 |
286 virtual void needTouchEvents(bool) = 0; | 260 virtual void needTouchEvents(bool) = 0; |
287 | 261 |
288 virtual bool selectItemWritingDirectionIsNatural() = 0; | |
289 virtual bool selectItemAlignmentFollowsMenuWritingDirection() = 0; | |
290 // Checks if there is an opened popup, called by RenderMenuList::showPopup()
. | 262 // Checks if there is an opened popup, called by RenderMenuList::showPopup()
. |
291 virtual bool hasOpenedPopup() const = 0; | 263 virtual bool hasOpenedPopup() const = 0; |
292 virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const = 0; | 264 virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const = 0; |
293 virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*)
const = 0; | 265 virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*)
const = 0; |
294 #if ENABLE(PAGE_POPUP) | 266 #if ENABLE(PAGE_POPUP) |
295 // Creates a PagePopup object, and shows it beside originBoundsInRootView. | 267 // Creates a PagePopup object, and shows it beside originBoundsInRootView. |
296 // The return value can be 0. | 268 // The return value can be 0. |
297 virtual PagePopup* openPagePopup(PagePopupClient*, const IntRect& originBoun
dsInRootView) = 0; | 269 virtual PagePopup* openPagePopup(PagePopupClient*, const IntRect& originBoun
dsInRootView) = 0; |
298 virtual void closePagePopup(PagePopup*) = 0; | 270 virtual void closePagePopup(PagePopup*) = 0; |
299 // For testing. | 271 // For testing. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 virtual void logDiagnosticMessage(const String& message, const String& descr
iption, const String& status) { UNUSED_PARAM(message); UNUSED_PARAM(description)
; UNUSED_PARAM(status); } | 304 virtual void logDiagnosticMessage(const String& message, const String& descr
iption, const String& status) { UNUSED_PARAM(message); UNUSED_PARAM(description)
; UNUSED_PARAM(status); } |
333 | 305 |
334 virtual FloatSize minimumWindowSize() const { return FloatSize(100, 100); }; | 306 virtual FloatSize minimumWindowSize() const { return FloatSize(100, 100); }; |
335 | 307 |
336 virtual bool isEmptyChromeClient() const { return false; } | 308 virtual bool isEmptyChromeClient() const { return false; } |
337 | 309 |
338 virtual String plugInStartLabelTitle() const { return String(); } | 310 virtual String plugInStartLabelTitle() const { return String(); } |
339 virtual String plugInStartLabelSubtitle() const { return String(); } | 311 virtual String plugInStartLabelSubtitle() const { return String(); } |
340 virtual String plugInExtraStyleSheet() const { return String(); } | 312 virtual String plugInExtraStyleSheet() const { return String(); } |
341 | 313 |
342 // FIXME: Port should return true using heuristic based on scrollable(Render
Box). | |
343 virtual bool shouldAutoscrollForDragAndDrop(RenderBox*) const { return false
; } | |
344 | |
345 virtual void didAssociateFormControls(const Vector<RefPtr<Element> >&) { }; | 314 virtual void didAssociateFormControls(const Vector<RefPtr<Element> >&) { }; |
346 virtual bool shouldNotifyOnFormChanges() { return false; }; | |
347 | 315 |
348 // Notifies the client of a new popup widget. The client should place | 316 // Notifies the client of a new popup widget. The client should place |
349 // and size the widget with the given bounds, relative to the screen. | 317 // and size the widget with the given bounds, relative to the screen. |
350 // If handleExternal is true, then drawing and input handling for the | 318 // If handleExternal is true, then drawing and input handling for the |
351 // popup will be handled by the external embedder. | 319 // popup will be handled by the external embedder. |
352 virtual void popupOpened(PopupContainer* popupContainer, const IntRect& boun
ds, | 320 virtual void popupOpened(PopupContainer* popupContainer, const IntRect& boun
ds, |
353 bool handleExternal) = 0; | 321 bool handleExternal) = 0; |
354 | 322 |
355 // Notifies the client a popup was closed. | 323 // Notifies the client a popup was closed. |
356 virtual void popupClosed(PopupContainer* popupContainer) = 0; | 324 virtual void popupClosed(PopupContainer* popupContainer) = 0; |
357 | 325 |
358 protected: | 326 protected: |
359 virtual ~ChromeClient() { } | 327 virtual ~ChromeClient() { } |
360 }; | 328 }; |
361 | 329 |
362 } | 330 } |
363 #endif // ChromeClient_h | 331 #endif // ChromeClient_h |
OLD | NEW |